0

I'm planning to track share button clicks i.e the facebook, twitter, linked in button links on my website. These icons are present in all of my pages as an inline sharebar and as floating sharebar.

I'm using GA4 property. I wanted to use below gtag call to send the custom event.

gtag('event', <action>, {
  'event_category': <category>,
  'event_label': <label>,
  'value': <value>
});

My doubts are how to frame the event properly so as to capture all the necessary information. Things to track as

  • The name of the social media site the user clicked
  • From which sharebar the button was click
  • The page URL

I'm planning something like this,

  • action = share
  • event_category = Facebook
  • event_label = page url ???
  • sharebar = inline ??

Please share suggestions on how to frame this event. I'm confused on what should be the association. Also do I need to explicity pass the page URL and other information for custom events ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.