Search code examples
analyticsgoogle-tag-manageradobe-analytics

How to send events in Adobe Analytics using GTM


I am using GTM to fire Adobe Analytics scripts on all the pages. It is working as desired. However I am wondering if is there a way to set up click events with no page refresh, in the same way as Google Analytics click events are set up. I am using s.tl() call however it is not sending the events to adobe omniture. Any thoughts on this. I know if I use DTM, it can be setup easily.


Solution

  • Assuming that you have Adobe Analytics already present on your website, s object is already present on your website. All you need to do is to put these codes on your website and fire this using GTM as a custom HTML Tag on basis of the trigger you require. There are standard events like gtm.js, gtm.dom and gtm.load already present. You can create your own custom event on top of this on basis of elements load. Using the same event you can fire these lines of codes on your website and this should give you what are you looking for.

    <script type = "text/javascript">
        var s = s_gi('yourreportsuiteID'); // replace this with your RSID!
    
        s.visitorNamespace = "yournamespace" //optional
        s.trackingServer = "yourtrackingserver" //optional
        s.trackingServerSecure = "yoursecuretrackingserver"//optional
        s.events = "event35";// your event number has to be activated in Adobe
        s.linkTrackVars = "events,eVar38";//your eVar number has to be activated in Adobe
        s.linkTrackEvents = "event35";
        s.eVar38 = {{GTMVariable}}
        s.tl( this,
              "o",
              "FriendlyName" );
    </script>