Page 1 of 1

google analytics and the shopping cart

Posted: Tue Aug 11, 2009 3:47 pm
by Phasm
I wish to track the conversions from my client's google analytics campaign to purchases with our client's products (both 5lb and 10lb sizes).

Google gave me this code to insert into their website that will embed cookies and tracks conversions. It's javascript.

However I'm not really sure where to place the code. I've been digging through the cart module but can't find a place to put it.

Any help / suggestions would be greatly appreciated.

Thank you.

How to use Google Analytics with CMS Made Simple

Posted: Fri Aug 14, 2009 1:23 pm
by kendo451
Do this:

1. With Content->Global_Content_Blocks create a new global content block called "analytics" with this inside:

Code: Select all

{literal}
<!--- paste the google analytics code here -->
{/literal}
Don't forget the {literal}{/literal} tag or it will not work!

2. In all of your page templates, put this line at the very end, right before

Code: Select all

{global_content name='analytics'}
3. In Google analytics you can set up your "funnel" to measure the various pages in your checkout chain.  Just go through the buying process once and note the URL of each page.  Then put the page URLs in Google Analytics as a "Goal" to measure your conversions and see how people go through your sales "funnel".

Hope this is helpful. Don't forget to modify the title of this post to [solved].

Ken

Re: google analytics and the shopping cart

Posted: Mon Aug 17, 2009 2:16 pm
by Phasm
Ken,

Thank you for your help!!! I will give this a try and when I get the report that it all works, I will edit the title.

Re: google analytics and the shopping cart

Posted: Tue Aug 18, 2009 8:34 pm
by Phasm
What file would I be creating this new content block in? and I can't find the template files for the shopping cart. All that I can find is the template_c folder and with my past experience with smarty I'm pretty sure that's all temporary.

any more info would be greatly appreciated!!

Re: google analytics and the shopping cart

Posted: Tue Aug 18, 2009 9:57 pm
by kendo451
You don't put it in a file, you put it in the page template.

Log into yoursite.com/admin

Click Layout->Templates

Look in the page template near the very end and insert {global_content name='analytics'} just before

(That is of course, assuming you followed my advice and created a global content block named "analytics" and put your GA code in there between {literal} and {/literal} tags.

Re: google analytics and the shopping cart

Posted: Wed Aug 19, 2009 12:23 am
by Phasm
ahh okay, then the final question would be, where do i create a global content block named "analytics"

is that in the admin panel as well?

Re: google analytics and the shopping cart

Posted: Wed Aug 19, 2009 12:30 am
by kendo451
It sounds like you haven't looked at the very basics of CMSMS.

Log in to the admin area

Under "Content" find "Global Content Blocks"

create a new one.

Paste your Google Analytics Code in there.

Before the beginning of the code put {literal}

at the end of the code put {/literal}

Then name it analytics and click submit.

Re: google analytics and the shopping cart

Posted: Wed Aug 19, 2009 12:34 am
by Phasm
Yeah, sorry about that. This is a one time thing. after this change and a few months of development there wont be any more cmsms so I won't have to worry about it :)

I will be performing this tomorrow and will report on how it all goes. Thank you Ken for your time! It's truly appreciated.