The Internal Promotions report in Universal Analytics was one of my favourite Enhanced Ecommerce tracking features. It allowed you to track impressions and clicks for homepage banners, main navigation links or other elements with internal links and then attribute transactions and revenue to those clicks:
Unfortunately, in GA4, this feature was changed fundamentally. Internal Promotions do exist in GA4, but it is now required to send product data with every click and impression.
This requirement means that you can now only track impressions and clicks for promotions for a specific product, which renders the feature useless for general promotions like banners that point to a category page, general discounts, or main navigation links.
If you decide to send impressions and clicks without product data to GA4, then the Internal Promotions report in GA4 looks like this (showing impressions and clicks, but no further actions tied to them):
However, there is a more or less satisfying way to rebuild the original Internal Promotions report from Universal Analytics in GA4. This is what it looks like:
Let’s go through how to build this, step by step.
Here are the steps that will be required (detailed descriptions of each step below):
- Create a custom dimension for the promotion name and two custom metrics for promotion views (aka impressions) and promotion clicks in GA4.
- Send events for promotion views and clicks to GA4, using GTM or gtag.
- Save the promotion name in a cookie when a promotion click is tracked.
- Send the value from the cookie to GA4 with all following ecommerce events.
- Create an Exploration in GA4 to show the data.
1. Custom dimension and metrics in GA
We will need a custom dimension for the promotion name and two custom metrics for promotion views and promotion clicks in GA4. Go to Admin > Custom definitions and create a custom dimension with the name “Internal Promo Name”, the scope “Event” and the event parameter “internal_promo_name”:
Next, create two custom metrics with the names “Internal Promo Clicks” and “Internal Promo Views”, the scope “Event”, the event parameters “internal_promo_click” and “internal_promo_view” and the unit of measurement “Standard”:
2. Sending events for promo views and clicks to GA4
As you are rebuilding the old Universal Analytics Internal Promotions report, you already know when to send promo views and clicks. I am using GTM in this example so I just use the same triggers I have been using for UA.
For the new GA4 tracking, send the following events to GA4:
For promo views
Event name: internal_promo_view
|dynamic – the name of the viewed promotion
This is what the tag configuration would look like in GTM (if you are using gtag, you can use the same values – documentation here):
For promo clicks
Event name: internal_promo_click
|dynamic – the name of the clicked promotion
Again, this is what it would look like in GTM:
3. Saving the promo name in a cookie
In the last screenshot, you have already noticed that I am using a so-called “Cleanup Tag” that fires right after the promo click event. This tag simply saves the internal promo name in a cookie.
Whenever I need to set cookies in GTM, I refer to this extremely useful article by Julius Fedorovicius: Set Cookies with Google Tag Manager (also read and delete them)
If you are using gtag, you will find a different method to set a cookie with the following parameters:
Cookie name: internalPromoName
Cookie value: dynamic – the name of the clicked promotion
Expiration time: 30 minutes
This is what the tag configuration looks like in GTM:
4. Sending the promo name with ecommerce events
Now that we have saved the promo name in a cookie, we can send it along as a parameter with all following ecommerce events, including purchases.
In GTM, this can be done very easily with the help of a 1st-Party Cookie variable that pulls the value of the cookie we set in the last step:
Again, if you are using gtag, you will find a different method to pull the value of our new cookie.
Then, you just add the Event Parameter “internal_promo_name” to all ecommerce events that you send to GA4 and give it the value of the cookie.
This is what the tag configuration of the purchase event would look like in GTM with the new Event Parameter “internal_promo_name” at the bottom:
5. Exploration in GA4
Now that we are tracking impressions and clicks and sending the name of the last clicked promotion along with all ecommerce events, including purchases, we can build an Exploration in GA4 to show the data.
In this example, I included the dimension “Internal Promo Name” and the following metrics:
- Internal Promo Views
- Internal Promo Clicks
- Add to carts
- Ecommerce purchases
- Purchase revenue
I also added a filter that excludes the value “(not set)” for the dimension “Internal Promo Name”.
Here you can see the result again (same screenshot as at the top):
If your Universal Analytics property is still tracking data and you compare your rebuilt GA4 report with the old report in UA, you will notice that the numbers for impressions and clicks are identical, except for the small variation that you have to expect when you compare data collected by different tracking scripts.
“Add to carts” and “Checkouts” did not exist in the old Universal Analytics report, so they are an added value here.
GA4 does not have calculated metrics (yet?), so the new report does not have equivalents for “Internal Promotion CTR” and “Transactions Per Internal Promotion Click”, but we could calculate them in Looker Studio or in a spreadsheet, if we wanted to.
The revenue attributed to clicks, you will notice, is higher with this method than it was in the old UA report.
I believe this is partly due to the fact that the cookie survives the end of a session and is valid for a total of 30 minutes. I assume that UA only attributes sales to promo clicks that happen within the same session and it is not clear if there is a time limit in UA.
Also, there is no information about how UA deals with consecutive clicks on different promotions, but I would assume that it is simply a last-click model, just like in the approach described here.
If you have time for testing (and if your Universal Analytics property is still tracking data), you can play around with the cookie expiration time (and maybe also test with a session cookie) to see if you can manage to get matching revenue numbers in the old and new reports.
Please just leave a comment on this post if you have any questions or remarks. I’ll be happy to help!