How to add UTM codes to the Product URL
Adding UTM codes to the product URL in a feed are easy with the product feed manager plugin. In the feed editor you can select the “Google Analytics Tracking” checkbox.
When selected you will find a Google Campaign URL Builder at the bottom of the feed editor.
In the Google Campaign URL builder you can add 5 UTM codes to your url to track clicks in Google Analytics.
Here’s a breakdown of the five UTM parameters used in Google’s Campaign URL Builder, designed to help track different aspects of your marketing campaigns:
- Campaign Source (utm_source): This is required and represents the source of traffic, like the website or platform directing users to your site. Examples include specific channels like facebook, google, or BING. It answers “Where is this traffic coming from?”
- Campaign Medium (utm_medium): Also required, this identifies the marketing medium or format. Common entries for a product feed would be cpc (cost-per-click). This parameter clarifies the “how” of traffic.
- Campaign Name (utm_campaign): This distinguishes the specific campaign you’re running. You might use something like a product name or the title of the product feed. It helps organize data for individual campaigns.
- Campaign Term (utm_term): Often used for paid search campaigns, this field can track keywords or specific search terms. For example, if bidding on keywords, you might enter running_shoes to see if that term attracted clicks. This parameter is optional but useful for keyword analysis.
- Campaign Content (utm_content): This field is helpful for A/B testing or differentiating similar links within the same ad, email, or landing page. You might use values like productfeed_link, brand or Item_group_id to see which version drives more traffic.
Dynamic data using shortcodes
Using shortcodes, you can dynamically populate UTM codes.
The following shortcodes are available:
- [product-title] – Replaced with the product title
- [product-id] – Replaced with the post ID
- [product-sku] – Replaced with the product SKU
- [product-group-id] – Replaced with data from the product_group_id attribute
- [product-brand] – Replaced with data from the brand attribute
Currently, these shortcodes can only be used with a PHP snippet. Add the snippet below to your functions.php file or use a code snippet plugin.