About yuhui

This author has not yet written his bio.
Meanwhile let's just say that we are proud yuhui contributed with 2 entries.

Entries by yuhui

Do not use blank “campaignId” strings with Google Analytics tags

Sparkline were set with a curious challenge when one of our clients raised a problem with the Google Analytics Source/Medium report. The top Source/Medium by sessions was “(not set) / (not set)”. This was very, very unusual. We asked what could possibly cause GA to not recognise Source/Mediums correctly?

After some untangling, we discovered that the blank string had been set as the campaignId in the GA tags. Since GA couldn’t interpret the blank string, it simply saved the Source/Medium as “(not set) / (not set)”.

Read more »

Track Internal Campaigns to Google Analytics using Google Tag Manager

Footprints

If you use Google Analytics (GA) in your website, then you’re probably already tracking your external campaigns properly. But are you tracking your internal campaigns as well? These are marketing campaigns that you run within your website, like homepage banners that link to promoted products.

External campaigns are tracked with GA’s built-in utm_source, utm_medium, utm_campaign, utm_content and utm_term parameters to identify the marketing campaigns that drive users to your website.

However, for internal campaigns, you shouldn’t use these utm_source / utm_medium / etc tracking. If you do, GA replaces your external campaign tracking with these internal ones.

There are four ways to track internal campaigns in GA:

MethodProsCons
Enhanced Ecommerce’s PromotionsDesigned for internal campaign reporting, built into GAReport is limited to Ecommerce’s metrics
EventsQuick to setup and understandLimited to clicks on links, doesn’t encapsulate entire user behaviour
Site SearchNo coding neededFunction isn’t meant for internal campaigns
Custom DimensionsDesigned for business-specific reporting needs, flexible usageSome coding required

I personally prefer the Custom Dimensions method because it makes the most sense. It doesn’t force Events nor Site Search to be adapted for campaign tracking. And it can be used in reports that contain other dimensions and metrics.

And it can be done fairly easily with Google Tag Manager (GTM). Let me show you how.

Read more »