Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleThis Article Is For:
  • All users who have the 'Manage Website Settings' permission
  • This is applicable to: All Themes


Info

For additional information on how to use GA event tracking, see this article: https://developers.google.com/analytics/devguides/collection/analyticsjs/events

This article is intended for advanced users that want to add custom event tracking to their SoCast websites.  It requires access to the Website / Settings panel.  

Step-by-step guide

To add event tracking follow these steps:

  1. Find a button from your website that you wish to track

  2. Right click that button and select "Inspect Element"

  3. In the path of the element (see attached screenshot), find the last element to the right containing a hash tag, e.g. "#listenBtn"


  4. Put the following code in the 'Website Custom Footer HTML' section with the element name placed in the first brackets in the second line (in this case "#listenBtn"):
    <script>
    $("#listenBtn").click(function() {
    ga("send", "event", "player", "listen");
    });
    </script>

 

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@10ef6
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("googleanalytics","google","analytics","website") and type = "page" and space = "FAQ"
labelsAnalytics Google GoogleAnalytics Website


Page Properties
hiddentrue


Related issues