Jump to content

Google Analytics


INUMIO-Rob

Recommended Posts

Hello friends, I am wondering if the Blesta UI exposes a place for me to paste my Google Analytics, or if I need to put it into the html manually somewhere?

I searched the subject but came up with few relevant results, none from 2016. I did look in a few places in Blesta but am not seeing anything.

Thank you.

Link to comment
Share on other sites

You can use CSS Java Toolbox plugin form Naja/Blesta Addons.... select just client template and it will exclude admin tpl  ..I have do it at this way for few clients....after you plugin is installed just click on menage--->than  "add custom html code"--->and than you'll have  two  options,first is to  select between " All pages" or "admin tpl" or "client tpl "   and as last step select "before the </body> tag".

If you want exclude admin area select "client tpl/pages"   ,your code will be placed at bottom of every page ...it is where i put <script></script>  even if i do it manualy....

Link to comment
Share on other sites

19 hours ago, Nelsa said:

You can use CSS Java Toolbox plugin form Naja/Blesta Addons.... select just client template and it will exclude admin tpl  ..I have do it at this way for few clients....after you plugin is installed just click on menage--->than  "add custom html code"--->and than you'll have  two  options,first is to  select between " All pages" or "admin tpl" or "client tpl "   and as last step select "before the </body> tag".

If you want exclude admin area select "client tpl/pages"   ,your code will be placed at bottom of every page ...it is where i put <script></script>  even if i do it manualy....

i have forget this plugin ;)

with this plugin you can set any HTML css with your blesta without touching any core file .

 

Link to comment
Share on other sites

  • 1 year later...

You could create a template for each company, then edit each template.  Or add some PHP similar to the following:

<?PHP
$host = $_SERVER['HTTP_HOST']; 
if ($host == "YOURCOMPANYBLESTAURL"){
	echo 'YOUR CODE';
} elseif  ($host == "YOURCOMPANYBLESTAURL"){
	echo 'YOUR CODE';
}
?>

I'm sure there is a better way than the above but it works for us with our live chat.

Link to comment
Share on other sites

On 8/6/2018 at 9:12 PM, WebhostingNZ.com said:

You could create a template for each company, then edit each template.  Or add some PHP similar to the following:


<?PHP
$host = $_SERVER['HTTP_HOST']; 
if ($host == "YOURCOMPANYBLESTAURL"){
	echo 'YOUR CODE';
} elseif  ($host == "YOURCOMPANYBLESTAURL"){
	echo 'YOUR CODE';
}
?>

I'm sure there is a better way than the above but it works for us with our live chat.

This is the "better way" if editing structure.pdt

<?php if($system_company->id == "1") { ?>
.. your code here ..
<?php } ?>

Just change the ID "1" to your company ID. Then you don't have to do the hostname validation yourself, it'll be done based on the company.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...