This enrichment can be used to link events to marketing campaigns, using the query string parameters.
When using online marketing campaigns to drive traffic to our website, it is usually possible to find information in the query string parameters to identify the particular campaign, medium and more.
A link for an online advertisement that brings users back to our site might look like:
This could result in the following fields being added to the enrich event:
The configuration of the enrichment defines which parameters in the URL (e.g.
utm_source) map to which fields in the event (e.g.
mkt_source) — see examples below.
In addition, this enrichment automatically knows about Google (corresponding to the
gclid query string parameter), Microsoft (
msclkid), and DoubleClick (
dclid). For example, if the query string contains
&gclid=abc, this will be the result:
Here’s an example for standard Google parameters. It specifies that the
utm_medium parameter in the query string will map to the
mkt_medium field in the event, and so on.
And here’s an example for Omniture (only the
mkt_campaign field will be populated):
Supporting multiple parameters
What if some of your links use
utm_campaign=... and some use
In this case, you can configure more than one parameter name in the array, like so:
The same applies to other configuration options, namely
If the query string includes multiple acceptable parameters (e.g. both
legacy_campaign), the first one listed in the configuration will be used (not the first one present in the query string).
|query string||value of |
Click and network attribution
You can define which URL parameters are used to populate the
mkt_clickid field (the defaults include
dclid). For each parameter, the same configuration setting also defines what network — the
mkt_network field — it corresponds to (by default,
gclid corresponds to
dclid to DoubleClick).
You can configure any parameter names or network names, including your custom ones.
In the next example, we will customize the
- First, we add support for
gbraidparameters, which will be mapped to
- Second, we override the
msclkidparameter, so that it maps to
NotMicrosoftas the marketing network (instead of the default
- Third, we add a custom
xyzidparameter that maps to the
- Other default mappings for
You should not use more than one click parameter in the query string (e.g. both
gbraid). If you do, one of them will be picked arbitrarily.
|query string||value of ||value of |
This enrichment populates the following fields of the atomic event :
|The advertising or marketing medium, for example: |
|Identifies the advertiser, site, publication, etc. that is sending traffic to your property, for example: |
|Identifies keywords (terms).|
|Used to differentiate similar content, or links within the same ad. For example, if you have two call-to-action links within the same email message, you can use |
|The individual campaign name, slogan, promo code, etc. for a product.|
|Click ID which resulted in the redirect/follow request|
|The advertising network name, either default determined from parameter for Click ID or custom specifically stated|
If the enrichment is not activated, those fields will not be populated.