August 9, 2021

Event Clicks in Google Analytics 4

Google Analytics 4 is here and it's great. Learn how to harness the powerful event-tracking capabilities of the Data Layer

On Click Data Layer Push Examples

These are the examples from the video:

MENU BUTTON

<a href=”#” class=”button” onclick=”dataLayer.push({‘event’ : ‘click’,’clickType’ : ‘Menu Link’, ‘clickName’ : ‘Menu’, ‘clickCampaign’ : ‘none’});” target=””_blank”” rel=”noopener noreferrer”> Menu Button </a>

BLOG BUTTON


<a href=”#” class=”button” onclick=”dataLayer.push({‘event’ : ‘click’,’clickType’ : ‘Content Link’, ‘clickName’ : ‘Blog’, ‘clickCampaign’ : ‘blog’});” target=””_blank”” rel=”noopener noreferrer”> Blog Button </a>

AFFILIATE BUTTON

<a href=”#” class=”button” onclick=”dataLayer.push({‘event’ : ‘click’,’clickType’ : ‘Content Link’, ‘clickName’ : ‘Affiliate link’, ‘clickCampaign’ : ‘affiliate’});” target=””_blank”” rel=”noopener noreferrer”> Affiliate Button </a></center>


Get Digital Marketing Growth - Contact us

Get in touch