Sometimes we are asked the question like the one below:
I want to know if it’s possible to send
utm_
params using pixel. In normal clicks,utm_
params get parsed automatically. I was wondering if that could be achieved with pixel as well.
That is possible indeed. The utm_
parameters need to be passed on the querystring of the page URL. So you would need to set the url
parameter on the pixel. It could be set to a dummy value e.g.
url=http://dummy-value-so-we-can-set-utms?utm_medium=med_1
and make sure the querystring on that is url encoded i.e.
url=http%3A%2F%2Fdummy-value-so-we-can-set-utms%3Futm_medium%3Dmed_1
You could use this online tool for the task.
Pixel tracker
The Pixel tracker is an HTML-only tracking tag (no JavaScript). In a normal JavaScript tag, the name-value pairs of data that are sent through to the Snowplow collector via the querystring are calculated on the fly by the JavaScript. In an environment where JavaScript is not permitted, these values need to be set in advance, and hardcoded into the tracking tag.
Campaign tracking with Snowplow
Snowplow uses the same query parameters used by Google Analytics. Those parameters are:
utm_source
- Identify the advertiser driving traffic to your site e.g. Google, Facebook, autumn-newsletter etc.utm_medium
- The advertising / marketing medium e.g. cpc, banner, email newsletter, in-app ad, cpautm_campaign
- This can be a descriptive name or a number / string that is then looked up against a campaign table as part of the analysisutm_term
- Used for search marketing in particular, this field is used to identify the search terms that triggered the ad being displayed in the search results.
utm_content
- Used either to differentiate similar content or two links in the same ad. (So that it is possible to identify which is generating more traffic.)
Further reading:
Putting it all together
Here’s a summary what is required to send the utm_
parameters using pixel:
- An event to be attached with the pixel tag
- The
utm_
parameters of our interest - The encoded (dummy)
url
containing theutm_
parameters as querystring
Example:
<!--Snowplow start plowing-->
<img src="http://collector.snplow.com/i?&e=pv&url=http%3A%2F%2Fdummy-url%3Futm_source%3DFacebook%26utm_medium%3Dbanner%26utm_campaign%3DFall%20sale"/>
<!--Snowplow stop plowing-->
The above tag could be embedded into emails sent out as part of the marketing campaign. Note that I used
- our Clojure collector’s pixel as the endpoint
http://collector.snplow.com/i
- the
pageview
event (e=pv
) - the
utm_
parameters descibing the campaign, namely: utm_source
=Facebookutm_medium
=bannerutm_campaign
=Fall sale
When the email is opened the pixel will be fetched and the event recorded with all the utm_
parameters.