Jump to content

Adding google analytics code to checkout


Guest hairfreax

Recommended Posts

If I were to add google analytics's code to my purchase confirmation page, where would this be? And would it conflict with any cart functions?

thanks

we're looking at adding this to 4.1. but in the meantime, the best thing to do is paste the google js code into the top of skins/<yourskinname>/styleTemplates/content/confirmed.tpl

Link to comment
Share on other sites

actually, thinking about it, you're probably be better off putting the analytics code into skins/<yourskin>/styleTemplates/global./index.tpl just above the prototype.js line, like this...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset={VAL_ISO}" />

<title>{META_TITLE}</title>

<meta name="description" content="{META_DESC}" />

<meta name="keywords" content="{META_KEYWORDS}" />



<link href="skins/{VAL_SKIN}/styleSheets/layout.css" rel="stylesheet" type="text/css" />

<link href="skins/{VAL_SKIN}/styleSheets/style.css" rel="stylesheet" type="text/css" />

<link href="skins/{VAL_SKIN}/styleSheets/lightbox.css" rel="stylesheet" type="text/css" media="all, screen"  />



<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>

<script type="text/javascript">

_uacct = "UA-2476427-1";

urchinTracker();

</script>



<script type="text/javascript" src="js/prototype.js"></script>

<script type="text/javascript" src="js/jslibrary.js"></script>

<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>

<script type="text/javascript" src="js/lightbox.js"></script>

</head>

done this way, you'll get the analytics running on every page of your site, and you'll get tones more information about your visitors

Link to comment
Share on other sites

Guest hairfreax

actually, thinking about it, you're probably be better off putting the analytics code into skins/<yourskin>/styleTemplates/global./index.tpl just above the prototype.js line, like this...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset={VAL_ISO}" />

<title>{META_TITLE}</title>

<meta name="description" content="{META_DESC}" />

<meta name="keywords" content="{META_KEYWORDS}" />



<link href="skins/{VAL_SKIN}/styleSheets/layout.css" rel="stylesheet" type="text/css" />

<link href="skins/{VAL_SKIN}/styleSheets/style.css" rel="stylesheet" type="text/css" />

<link href="skins/{VAL_SKIN}/styleSheets/lightbox.css" rel="stylesheet" type="text/css" media="all, screen"  />



<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>

<script type="text/javascript">

_uacct = "UA-2476427-1";

urchinTracker();

</script>



<script type="text/javascript" src="js/prototype.js"></script>

<script type="text/javascript" src="js/jslibrary.js"></script>

<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>

<script type="text/javascript" src="js/lightbox.js"></script>

</head>

done this way, you'll get the analytics running on every page of your site, and you'll get tones more information about your visitors

I would like to use the e-commerce section in analytics, so it would need to be on a 'thank you for your purchase' page. If this is going to be release in 4.1 i'll just wait, I am in no desperate need, cube has made back its purchase price in 2 working days. Not alot of packages can boast that ROI.

Link to comment
Share on other sites

  • 3 weeks later...

Hi

I have tried this but when you go to login the page is no longer secure. Does this happen to anyone else?

I can not place the script there, even though I know it did send the info back to the analytics.

:)

__________________

Edited:

I have fixed this now, anyone that wants help with this msg me.

:D

Link to comment
Share on other sites

  • 2 weeks later...

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.

×
×
  • Create New...