UTM Parameters in the GeoIP Country Redirect
Last updated
Last updated
UTM parameters are specific text strings that you can append to URLs that allow you to track those URLs when they get clicked on. UTM parameters make Google Analytics pick up on the data in the code and log it with the pageview.
A UTM-free URL look something like this:
https://spicegems.com
But the URL including the UTM parameters looks like this:
https://spicegems.com?utm_source=GeoIP_Country_Redirect&utm_medium=US_Redirect_Rule&utm_campaign=popup
UTM parameters In this URL:
utm_source
utm_medium
utm_campaign
Keeping the already existing UTM parameters is very crucial as per business needs. To manage it, we have a feature in the app using which original parameters will be forwarded.
By enabling the UTM forward option, the already existing UTMs will work
If the UTM forward is disabled, only the UTM parameters defined in the app will add in URL while redirection.
Adding UTM parameters in the app is quite straightforward. The app allows you to add five UTM fields.
Scenario:
Let say you have created redirect rule if Canadian visitor land on "line-item.myshopify.com" then they will be redirect on the "sg-localapp.myshopify.com"
There are two case:
If UTM forwarding is enabled without adding custom parameters:
An existing UTM campaign runs on the source store (line-item.myshopify.com
).
1. utm_campaign=Final_sale
2. utm_source= Instagram
After redirection, the destination URL maintains the original UTM parameters:
If UTM forwarding is enabled and you add custom UTM parameters in the rule:
An existing UTM campaign runs on the source store (line-item.myshopify.com
).
utm_campaign=Final_sale
utm_source=Instagram
Custom UTM parameters are defined in the redirect rule:
utm_campaign=GeoIP_Country_Redirect
utm_source=US_Redirect_Rule
utm_medium=autoredirect
After redirection, the destination URL combines existing and custom parameters:
The priority will be given to the existing parameters and in case if any is missing our app will add to the URL.
1. utm_campaign=Final_sale (Already existing)
2. utm_source= Instagram (Already existing)
3. utm_medium=autoredirect (Added by the app)
Need any help, please contact us on help@spicegems.com