Categories
Analytics Shopify

sag_organic and product_sync in Google Analytics

If you use Shopify and Google Shopping, you may start to notice strange referral data in Google Analytics: Source=Product_sync and Campaign=sag_organic. What are they and How should you handle them?

If you recently installed the Google Shopping channel on Shopify, you may have noticed rise in strange referrals in your Google Analytics reports: Product_sync and sag_organic for medium and campaign parameters.

Where do sag_organic and product_sync come from?

They come from Shopify’s integration with Google Shopping. Specifically from UTM tags added to the product’s link url. When Shopify uploads your product feed to Google Merchant Center, it appends the following UTM tags to the product:

UTM TagValue
utm_sourcegoogle
utm_mediumproduct_sync
utm_campaignsag_organic
utm_contentsag_organic

The following querystring is appended to your product’s link url:

&utm_medium=product_sync&utm_source=google&utm_content=sag_organic&utm_campaign=sag_organic

This usually causes traffic coming from free/organic Google Shopping listings to show up in analytics with a medium of product_sync and Campaign of sag_organic.

What is sag_organic?

The “SAG” in sag_organic stands for Surfaces Across Google.

These parameters are Shopify’s way of helping you track the organic free traffic coming from Google Shopping. The intention is to help you separate Organic Google Shopping traffic from Organic Google Search Traffic.

The ability to get granular is good. But changing default Google Analytics behaviour is often unwelcome (in particular when the change is unexpected).

The default behaviour in Google Analytics for Organic Google Shopping traffic is to include it in the google / organic bucket.

Is it possible to keep default Google Analytics behaviour unchanged, while still gaining the ability to track Organic Google Shopping traffic separately?

The best of both worlds

By leaving source and medium at their default values, and only changing the campaign UTM tag, we can keep default Google Analytics reports unchanged, while gaining the ability to track Organic Shopping traffice separately.

Additionally we can use the content utm tag to track which specific products are sending us traffic.

UTMDefault ValueShopify ValueNew Value
utm_sourcegooglegooglegoogle
utm_mediumorganicproduct_syncorganic
utm_campaign(not_set)sag_organicshopping
utm_content(not_set)sag_organicproduct.title

Step 1
Rewrite the UTM tags

  1. Go to Merchant Center > Products > Feeds
  2. Click on the Content API feed
  3. Click on the Feed Rules tab
  4. Click the big blue PLUS + button, type link in the field, and select link from the drop down.
  5. For Data Source, select Set to, type link and select link from the Primary Feed: Content API list.
  6. Click OK
  7. Set the default behaviour if the link is blank to “Leave Blank”
  8. Now go to Modifications > Add Modification
  9. Choose Optimize URL > Set Parameter
FunctionParameter NameValue
Set Parameterutm_sourcegoogle
Set Parameterutm_mediumorganic
Set Parameterutm_campaignshopping
Set Parameterutm_contenttitle
(processed attribute)
Your link url rules should look something like this.
  1. Click OK and look in the right side column preview to see if the link has been properly updated.
  2. Click Save as Draft and Apply
Your new link rule should look something like the above

If you are using UTM tagging in your Google Ads campaigns, you *may* need to completely clear the UTM tags in Google Merchant Center. You can do this by creating an “Optimize URL” rule with “Remove Parameter” to remove each of the UTM tags individually.

Step 2
Set your Canonical Link

Fixing Shopify’s Partial Implementation
The major problem with the way Shopify implemented the UTM tags, is that they didn’t include a canonical_link as part of the feed. The canonical link ensures that only the “clean” version (without UTM tags) of the product link gets include into Google’s search index.

“If you use tracking parameters in your link attributes, it is recommend that you use the canonical_link attribute to provide a canonical URL. Use the canonical_link attribute to ensure that products are associated with the correct URL in the Google Search index.”

Google Merchant Center Help
https://support.google.com/merchants/answer/188492?hl=en

Add the Canonical Link

Assuming that you are still on the Feed Rules page in Goolge Merchant center:

  1. Click the big blue PLUS + button to add a new Rule and type canonical and choose canonical link from the drop down.
  2. For Data Source, select Set to, type link and select link from the Processed Attributes list.
  3. Click OK
  4. Change the default behaviour if canonical_link has no value to “leave blank”
  5. Add Modification > Find and Replace
    Now we need to add two Find & Replace operations. One to remove the UTM tags and another to remove the Currency parameter that Shopify also appends.
#FindReplaceAdvanced
1&?utm_.+?(&|$)$(leave blank)Search as regular expression
2&currency=(…)(leave blank)Search as regular expression
  1. Click OK and look in the right side column preview to see if the new link looks nice and clean. It should only have the variant id in there.
  2. Click Save as Draft and Apply
Your canonical feed rules should look something like the above

Done!

You may need to wait a few hours for your feed to be update with the new values.

By Alex Czartoryski

Alex is the director of digital marketing for Manitobah Mukluks, Canada’s fastest growing footwear brand, where he helps the luxury winter boot manufacturer accelerate growth profitably via digital marketing. Alex has over 20 years experience in e-commerce and digital marketing.

10 replies on “sag_organic and product_sync in Google Analytics”

I have the same issue as Scott, double tagging UTMs coming from Paid Shopping Ads. Is there a way to remove the tags when being pulled by Google Shopping Ads campaigns but keep the sag_organic ones in tact for Organic unpaid clicks? May be I could use ads_redirect , but I dont know how to use it..Alex, can you please let me know if there is any solution for this issue?

Like

Hi Suzie — unfortunately I don’t use UTM tags in my paid campaigns, so don’t have this issue (and so difficult to troubleshoot). Have you set your Canonical Links in Merchant Center to strip out all UTM tags?

Best,
Alex

Like

I have just finished fixing the canonical issue (thanks Alex for the regex) but am still problem solving the paid vs organic manual/doublel tagging issue. I’m astounded that Shopify would just assume everyone is using auto-tagging and Google Analytics at this kind of scale. Particularly when Shopify’s own analytics requires utms to do marketing reports.

Like

Ok, good news I think. Shopify analytics appears to look only at the last parameter present in a given URL. So in the case where they are doubled up, the final ones are taken. Google Adds {lpurl} *APPENDS* the campaign tags to the end of the feed-found URL, saving our skins. So while our URLs have two utm_campaigns, it is only using the one Google Ads stuck to the end. SLOPPY AF.

I really hate sloppiness like this, but I think this is going to work, at least for Shopify Analytics marketing reports by campaign.

Like

So for those of us wanting to utilize UTM tagging in Google Ads (e.g. so that our campaign data arrives in analytics software other than Google Analytics, like Shopify reports or Heap, for example) we end up with “double tagging” – even using your approach. We will get the SAG tags for medium and campaigns AS WELL AS our LP template tags from Google Ads.

I think that the only answer apparent here is to REMOVE the utm_medium and campaign parameters completely in the feed rules, or to introduce (somehow) a new parameter to use for the organic SAG and then do a search replace rule in Google Analytics to fix it back.

UGH!

Liked by 1 person

Hi Scott,

I was under the impression that the utm tags defined in the product url in Google Merchant center are NOT used in paid search campaigns. Have you set your canonical product links in Merchant Center to clean UTMless urls?

Theoretically, you should be able to have different UTM tags for your paid shopping campaigns, and another set of UTM tags for organic traffic coming from Google Surfaces. (In theory anyway).

Alex

Like

Incredibly useful guide – thank you very much!

Just to let you know, copying the 2nd item from the Canonical Link table replaces … with … (probably because of formatting). This one worked for me:

&currency=(…)

Like

Leave a Reply to Alex Czartoryski Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s