Jump to content
INUMIO-Rob

Google Analytics

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.

Share this post


Link to post
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....

Share this post


Link to post
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 .

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
On 8/7/2018 at 4:28 AM, inet said:

what if i have different companies under the same installation how i can manage this

if you have the Plugin Blesta Seo Tools this can do the job for you.

You can also use our Javascript and Css Tools box .

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×