PDA

View Full Version : Google Analytics _utmLinker Problem


solidago
08-12-06, 07:44 PM
Hello,

Does placing an OUI token into a javascipt function keep it from being run? Here's the story:

My site goes from www.store.com to store.myhost.com in the Basket Contents Header, so I need to use the solution at http://adwords.google.com/support/bin/answer.py?answer=26915&topic=8205, a portion of which is

Change the links from the main site to the secure site to use __utmLinker as follows. If your current links look like:
<a href="https://www.securecart.com/?store=parameters">Purchase Now</a>

change them to:

<script type="text/javascript">
document.write('<a href="javascript:__utmLinker(\'https://www.securecart.com/?store=parameters\');">Purchase Now</a>');
</script>
<noscript>
<a href="https://www.securecart.com/?store=parameters">Purchase Now</a>
</noscript>

The link into Merchant is "%VAR(g.secure_sessionurl)%Screen=OINF" and I tried putting this into the solution above, but when implementedin the site, the link doesn't work. Does anyone know what the problem is and what a solution may be?

Vic - WolfPaw Computers
08-12-06, 08:04 PM
Are you adding %OUI% as the very first 5 characters in the text box you are adding this code to?


Hello,

Does placing an OUI token into a javascipt function keep it from being run? Here's the story:

My site goes from www.store.com to store.myhost.com in the Basket Contents Header, so I need to use the solution at http://adwords.google.com/support/bin/answer.py?answer=26915&topic=8205, a portion of which is

Change the links from the main site to the secure site to use __utmLinker as follows. If your current links look like:
<a href="https://www.securecart.com/?store=parameters">Purchase Now</a>

change them to:

<script type="text/javascript">
document.write('<a href="javascript:__utmLinker(\'https://www.securecart.com/?store=parameters\');">Purchase Now</a>');
</script>
<noscript>
<a href="https://www.securecart.com/?store=parameters">Purchase Now</a>
</noscript>

The link into Merchant is "%VAR(g.secure_sessionurl)%Screen=OINF" and I tried putting this into the solution above, but when implementedin the site, the link doesn't work. Does anyone know what the problem is and what a solution may be?

solidago
08-12-06, 08:13 PM
Yep, %OUI% is the very first thing in the field (the Basket Contents Header), and the %VAR(g.secure_sessionurl)%Screen=OINF token worked fine before I put it into the Google script.

Vic - WolfPaw Computers
08-12-06, 08:19 PM
Where are you putting this, and can you paste the actual code you are using?

solidago
08-12-06, 11:40 PM
Hello,

The full code is below. This is going into the "Basket Contents Header" area under OpenStore™ Configuration: Headers/Footers. The basket URL stays under the www.store.com domain, and the checkout button is where it switches over to the myhost.store.com domain. This is the break that prevents tracking information (such as what referrals lead to conversions) from showing up in the analytics report, and theoretically the code that Google suggests will connect the two.

%OUI%
<div align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="33">
<tr>
<td>
<div align="left">
<img src="graphics/en-US/mmui/banner-head.jpg" alt="" height="23" width="336" border="0"></div>
</td>
<td>
<div align="right">
<font size="-2"><font face="Verdana, Arial, Helvetica, sans-serif"></font></font></div>
</td>
<td width="129">
<div align="right">
<a href="http://www.store.com"><img src="graphics/en-US/mmui/continue_shopping.jpg" alt="" height="19" width="119" border="0"></a></div>
</td>
<td width="71">
<div align="right">
<script type="text/javascript">
document.write('<a href="javascript:__utmLinker(\'%VAR(g.secure_sessionurl) %Screen=OINF"\');"><img src="graphics/en-US/mmui/checkout.jpg" alt="" height="19" width="68" border="0"></a>');
</script>
<noscript>
<a href="%VAR(g.secure_sessionurl)%Screen=OINF"><img src="graphics/en-US/mmui/checkout.jpg" alt="" height="19" width="68" border="0"></a>
</noscript></a></div>
</td>
</tr>
</table>
</div>
<p></p>

Vic - WolfPaw Computers
08-12-06, 11:48 PM
Why dont you put the javascript code into the Head/Body Tag insert area under Head Tag, where javascript calls should be?

You are also missing the body tag insert for the OnLoad which actually executes the code.

In your example below, you have the code in there, but it will never be executed since nothing is linked to it or calls it to run.

solidago
08-13-06, 05:56 PM
There was a stray " right after OINF in the URL, which appears to have caused the problem. I assume that the placement is OK where it is, as the instructions from Google say to simply replace the original URL with their script version.