PDA

View Full Version : tagging links with Google Analytics code


erichar11
06-28-06, 10:22 PM
Hi all,

I have created an email template to be used for our email marketing campaigns within Miva. Basically, it's just a catagory where the owner of the site can add products to the email catagory. We are using VC Catagory Page templates to handle this. Once he does this, he can then just copy and paste the view/source into our email marketing software. However, I would like to also add additional ga info to the product link such that we can track what is being clicked on in our email campaigns. You can view the template here:

http://www.hungrymindbooks.com/page/H/CTGY/email

When a user clicks on one of the titles, they currently get redirected here via
<a href="http://www.hungrymindbooks.com/page/H/PROD/email/1567187404">The Creative Astrologer</a>However, I would like them to get redirect like this which includes the ga tracking code:
<a href="http://www.hungrymindbooks.com/page/H/PROD/email/1567187404?utm_source=Hotlist&utm_medium=email">The Creative Astrologer</a> (notice the tracking code appended to the end of the href)

Any suggestions on how to accomplish this. Thanks

Eric

Vic - WolfPaw Computers
06-28-06, 11:03 PM
Why not create an Affiliate with a designator for that particular email campaign and append the affiliate code to the URL in the email?

You could add the Google Analytics code to the category header too.

erichar11
06-28-06, 11:42 PM
Why not create an Affiliate with a designator for that particular email campaign and append the affiliate code to the URL in the email?

You could add the Google Analytics code to the category header too.

But wouldn't that require creating a new affiliate code for each mail campaing inorder to track how successful the campaing is? We do a campaign every other week and this would seem cumbersome. The owner is not very tech savy and I can easily envisioning him bypassing the creation of an affiliate code and sending out the email, thereby losing tracking.

One of my goals was to make it as simple as possible for him. If I could get this links to display the proper ga code, then it's just a matter of adding the products to the email catagory, copying and pasting it into our email marketing software and sending it off. Creating an affiliate code for each would just add one more step which really isn't needed.

Do you think my first suggestion of adding the ga code to the link isn't possible?

Thanks for the suggestion. Will give it some further thought.

Vic - WolfPaw Computers
06-29-06, 12:40 AM
He'll only forget once :)

Analytics only allows the creation of 4 funnels if I remember correctly, you could push them through a funnel URL with the GA code on it, yes.

erichar11
06-29-06, 01:00 AM
He'll only forget once :)

Analytics only allows the creation of 4 funnels if I remember correctly, you could push them through a funnel URL with the GA code on it, yes.

"He'll only forget once" -- I wish :(

Not sure I follow you on the second part regarding pushing them through a funnel URL with GA code. I already have 4 funnels setup which track a customer through the purchase process (OSEL, OPAY, etc.) Not sure how this would help, could you explain a bit. Thanks.

erichar11
06-29-06, 03:10 AM
Ok, figured it out. Rather than using tokens to get the product name with a link I just built my own link. So before I had this:

<!-- %VAR(module|CBSSFL|prod_URL_dl)% --> which used Copernicus sfl module to get a link (which I couldn't append the appropriate ga code)

Now I have this:

<a href="http://www.hungrymindbooks.com/page/H/PROD/%prodcode%?utm_source=hotlist&utm_medium=email&utm_campaign=HL-%VAR(g.OUIX_FuncReturn)%">%prodname%</a>

So I manually create the link and add in tokens for the productcode and prodname. I then appended the manually build href with the appropriate ga code. Works great.

Now the owner can just add any products to the email catagory and ga code will be added automatically.

I also used the date function you provided to track the email campaigns by date which is why you see %VAR(g.OUIX_FuncReturn)% in the campaign variable.

Thanks for all you help.

Vic - WolfPaw Computers
06-29-06, 03:15 AM
No problem. Glad you got it working!