Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #435621

    Hi,

    I’m trying to track user clicks on the Social Media links in the header bar via Google Analytics (Universal) event tracking. I’ve followed the instructions I found at https://kriesi.at/support/topic/tracking-of-header-social-buttons-in-google-analytics/ and replaced the Google Analytics Asynchronous code with the Universal code but it doesn’t seem to work ….

    I’ve replaced replaced
    onclick=’_gaq.push([‘_trackEvent’, ‘ClickLink’, ‘”. $search_array[static::$social_counter].”‘, ‘Message’])’

    with
    onClick=’ga(‘send’, ‘event’, ‘ClickLink’, ‘”. $search_array[static::$social_counter].”‘, ‘Message’);’

    When I render the page in Google Chrome and inspect the Social Media elements, the code seems OK except the quotation marks look miss-formed and muddled … I get the following code … double quotes around the “ga” and the rest single quotes … not sure if this is the reason the tracking doesn’t work or something else?

    onclick=”ga(” send’, ‘event’, ‘ClickLink’, ‘Facebook’, ‘Message’);’

    Does anyone know the correct way to get this to work? Any help or advice would be gratefully received

    Many thanks in advance

    #435952

    Problem solved. In case of use to anyone the onClick line should read …

    onClick=\”ga(‘send’, ‘event’, ‘ClickLink’, ‘”. $search_array[static::$social_counter].”‘, ‘Message’);\”

    #436065

    Hey!

    Glad you figured it out!
    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
    For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)

    Cheers!
    Yigit

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Google Analytics (Universal) Event Tracking – Social Media Header Links’ is closed to new replies.