Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-07-10 15:01:11

Creation Theatre
New Member
Registered: 2012-07-10
Posts: 2

Tagging an external link within a form, for Google Analytics tracking

Hello, hopefully you can help!

I am trying to tag some external links so that Google Analytics can track them. However the links I need to tag and track are in a form within textpattern, that links to an image within the main navigation header, of the website .

When I add an <a> tag in this form, instead of just the url, the webpage crashes. Can any of you advise me how to tag this link successfully?

Many thanks,

Helen

Offline

#2 2012-07-10 15:21:17

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,173
Website GitHub Mastodon Twitter

Re: Tagging an external link within a form, for Google Analytics tracking

Hi helen

txp rarely crashes so can you post the exact code you are currently using?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2012-07-10 15:24:48

Creation Theatre
New Member
Registered: 2012-07-10
Posts: 2

Re: Tagging an external link within a form, for Google Analytics tracking

Whoops! I’m using the wrong language… Once I’ve saved the changes in textpattern I reload the webpage, but their is a problem with the code, so the page views incorrectly/images overlap and the page becomes a mess. So it doesn’t “crash” but the page does “break”. Does that make more sense?

Offline

#4 2012-07-10 15:49:06

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,173
Website GitHub Mastodon Twitter

Re: Tagging an external link within a form, for Google Analytics tracking

this sounds like a css problem. Can you post a url for us to check for you?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2012-07-10 16:09:45

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,925
Website GitHub

Re: Tagging an external link within a form, for Google Analytics tracking

Give your link a class, for example class="external", and then use something like this example to track clicks on links with that class. They’ll start showing up in your google analytics along with the link clicked.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB