Calculate the CTR of the sliding banner using Google Tag Manager

Business objective: Check an efficiency of the home page or any page banner.

CTR = Clicks/Impressions 


We will need to capture the click and view of the banner.

There will be two tags one for the view and another for the click.

For the Click: I have come across two biggest banks in India, who is using the banner slider, so in this article, I will use their website as a reference.

1) ICICI Bank: // 

2) Axis Bank: // 

To capture click simply use data layer code for each sliding banner.


dataLayer.push({‘event’:’GAEvent’, ‘gaEventCategory’:’banners’, ‘gaEventAction’:’homepage-banner-04′, ‘gaEventLabel’: ‘gold-sovereign’})

here event name is : GAEvent

Category is : Banners

Action is : homepage-banner-04 //banner position

Label is : gold-sovereign  // banner name

As you can see, both banner name and position will help us to decide which banner is working well and on which position.

Capturing click is not at all tricky, but a capturing view is really tricky.

For the View: You will need to use the dataLayer code which will look similar to the click dataLayer code the only difference is the firing condition. The click tag fire on the click of banner while view data layer will fire whenever banner will change. Your programmer will need to put the logic for firing the dataLayer code on each banner change.

dataLayer.push({‘event’:’GAEvent’, ‘gaEventCategory’:‘banners‘, ‘gaEventAction’:’homepage-banner-04′, ‘gaEventLabel’: ‘gold-sovereign’})

here event name is: GAEvent

Category is: Banners

Action is : homepage-banner-04 //banner position

Label is : gold-sovereign  // banner name

To get a custom report and to know whether it’s a click or view you will need to create one custom dimension and one custom metric.

Custom Dimension will capture whether it is click or view.
Custom Metric will have a default value as 1 which will get sum up while we create a report.

Click Tag will look like




Where Category, Action, and Label will be the Data layer variable which you have to create and use in the tag. The data layer which we have placed on the banner click.

Click Trigger


Fire on the custom event which we have placed on the page data layer.

In a similar way, you can create view tag.

Output will look like

If you have any queries please write in the comment box, I will revert as soon as possible.

You may also like...

Leave a Reply