Support

Account

Home Forums Add-ons Repeater Field How do I add a GA onclick event tracking to a Page Link in a Repeater field?

Helping

How do I add a GA onclick event tracking to a Page Link in a Repeater field?

  • Private Jet Vacations page – the page with the issue
    The two “See more Information” image has a Page Link to another page on the site. My client wants to add in Google Analytics “onclick” event tracking to the Page link to track when people click on the links.

    Where do I add in the code?

    `onClick=”ga(‘send’, ‘event’, ‘Navigation’, ‘See More Information’, ‘Napa Valley’); “>

  • It has to be added to the page where the html link is generated. May not be possible and we’d have to see where the link is generated. Not really an ACF question… but I have a better solution than putting onclick events in your code.

    Set up Google Tag Manager on the site. Once you’ve removed your standard GA code and added the Google Tag Manager code you can set up GA and add events to just about anything on the site without mucking about in the code.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.