Google Analytics into your Artisteer HTML Template


Author Message
Russell

Posted: 5/15/2012
Quote message 

@Pat in the "Feature Ideas & Suggestions" forum had a great question about inserting Google Analytics into your Artisteer HTML Template. I've provided one solution. Please view it and provide feedback and or other solutions.

http://www.artisteer.com/?post_id=190474&p=forum_post&forum_id=10

Looking forward to hear about other solutions to this issue until Artisteer could provide a method of inserting GA, JS, and JQuery scripts into Artisteer Projects.

Take Care,
Russell


 
Garry

Posted: 5/15/2012
Quote message 

You can also insert the GA code in Footer from: Footer-> Text
 
Russell

Posted: 5/16/2012
Quote message 

Quote Garry:

You can also insert the GA code in Footer from: Footer-> Text


Thanks Garry I'll try it...
 
hv

Posted: 8/6/2012
Quote message 

Quote Garry:

You can also insert the GA code in Footer from: Footer-> Text

Artisteer adds extra characters if Google script is added in to footer. This advice dont work.
And footer is wrong place after all.

-hv-
 
Mike

Posted: 8/6/2012
Quote message 

Adding the GA code directly into the footer.php page works well for me.
So not sure what you mean there.
Cheers
Mike
 
John

Posted: 10/3/2012
Quote message 

Doesn't work,
Where exactely in the footer do you put the analytics-code?
Best regards,
John
 
Dave B

Posted: 10/3/2012
Quote message 

What I am using is a search and replace program to add the custom code to the site's head.

This person has very kindly created something for just this purpose. There are other alternatives which can do this in one fell Swoop. http://www.artisteer.com/Default.aspx?post_id=200624&p=forum_post&forum_id=14

http://www.d2-designs.net/phpbb/viewforum.php?f=6

Easiest way is to use find </head> then use replace with the google code </head>

The program I am using for this (dreamweaver) works perfectly and you can save each site custom replacement values to quickly reuse it if you need to update the site in Artisteer and re export.

Or per Nick you can use notepad++ find and replace.

Way easier than the other proposed solutions I've seen so far.
 
Dave B

Posted: 10/3/2012
Quote message 

More clearly.

Find </head>

Replace, obvously using your own code from GA

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3264014-**']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script></head>