Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-4908

Set up tracking scheme for WhatsApp share button

XMLWordPrintable

    • Icon: Data Task Data Task
    • Resolution: Fixed
    • Icon: Should have Should have
    • None
    • None
    • Non-logged in
    • Analytics
    • All sites

      Context

      We should have a fixed way to assess whether the newly introduced Whatsapp sharing button is actually being clicked, so we need to set up event tracking (via dataLayer).

      There's already a dataLayer.push being fired on click for the existing buttons, we just need to adapt the code to include Whatsapp.  

      Related Tickets

      • PLANET-1818 Add dataLayer in NEW Social Sharing buttons

      Task

      Update the on click dataLayer.push used for the Social Sharing Buttons. Add the Whatsapp variable as the 'eventAction' options. 

       

       dataLayer.push({

       'event' : 'uaevent' //do not alter this name

       'eventCategory' : 'Social Share' //The Event Category to be sent to GA

       'eventAction' : '[variable]' //Facebook/Twitter/Email/Whatsapp

       'eventLabel' : '[variable]' //Optional, could be current URL

       });

       

      This will automatically collect the "click" event and send it to Google Analytics using the configuration of Google Tag Manager that is already in place.

       

            jmarubay Julia Marubayashi
            ltiralon Luca Tiralongo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: