Categories
Analytics Shopify

sag_organic and product_sync in Google Analytics

If you use Shopify and Google Shopping, you may have noticed strange referral data in Google Analytics: Source=Product_sync and Campaign=sag_organic. What are these referrals and how should you handle them?

Last Updated: April 5, 2023

If you installed the Google sales channel on Shopify, you may have noticed a rise in strange referrals in your Google Analytics reports: Medium = product_sync and Campaign = sag_organic

Where do sag_organic and product_sync come from?

When the Google sales channel uploades your product feed to Google Merchant Center / Google Shopping, it appends the following UTM tags to the product url:

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

Why do we need these UTM parameter?

Today, these UTM tags are no longer needed and should be stripped out from your product’s links.

They are a leftover from when Shopify first implemented the Google sales channel. They were Shopify’s way of helping you track the organic free traffic coming from Google Shopping. The intention was to help you separate Organic Google Shopping traffic from Organic Google Search Traffic.

The ability to get this granular is good, but the above implementation changed Google Analytic’s default behaviour, which is usually unwelcome (in particular when the change is unexpected).

A major problem with the Shopify implementation, 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. Without this, you risk having your organic search traffic comign in with these UTM tags as well.

What does sag_organic mean?

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

Surfaces Across Google was the name of the Google feature that enabled “free shopping listings”. It has since been renamed to “free shopping listings” and the name “SAG” is no longer used.

Fixing your Product Urls

If you have Auto-Tagging properly configured in both Google Ads and in Google Merchant Center, then Google Analytics will be able to properly differentiate between Paid and Organic Shopping traffic.

Step 1
Rewrite the UTM tags

This will remove all UTM parameters from your Product Links

  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 Name
Remove Parameterutm_source
Remove Parameterutm_medium
Remove Parameterutm_campaign
Remove Parameterutm_content
  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

Step 2
Set your Canonical Link

This will ensure 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
  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 to add a new Rule and type canonical and choose canonical link from the drop down.
  5. For Data Source, select Set to, type link and select link from the Processed Attributes list.
  6. Click OK
  7. Change the default behaviour if canonical_link has no value to “leave blank”
  8. 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

Step 3
Configure Auto-Tagging

This will configure Google Ads and Google Merchant Center to properly tag your product urls, and Google Analytics not to override that tagging:

  1. Google Ads (in the left hand menu)
    Settings > Account Settings > Auto Tagging: ON
  2. Google Merchant Center:
    Gear Icon > Conversion Settings > Auto Tagging: ON
  3. Google Analytics:
    Property Settings > Advanced Settings > Allow Manual Tagging to Override: OFF

Done!

You may need to wait a few hours for your feed to be update with the new values, but this *should* give you the default vanilla base setup that Google expects in Analytics.

Paid Shopping traffic will show up as google/cpc while Free Shopping traffic will show up as google/organic (or as “Shopping free listings” in GA4)

Related Resources

28 replies on “sag_organic and product_sync in Google Analytics”

I need a solution:

1 – I’m using shopify and Yampi checkout.

2 – I’m pulling the products by API and linking in Google Merchants Center.

3 – But all products are pulling Medium = product_sync and Campaign = sag_organic.

My question is, I would like to better measure the sales that are coming from Google Ads, for example, on Google Shopping. Because everything comes back with this automatic Shopify URL.

Like

i have seen this sag parameter even appearing in my paid shopping ads, if i remove this tagging, how can i add correct utm parameters on google shopping ads

Like

Hi Nitin,

Your setup should ideally look like this:
– In Google Ads, in the left hand menu: Settings > Account Settings > Auto Tagging: ON
– In Google Analytics: Property Settings > Advanced Settings > Allow Manual Tagging to Override: OFF
– In Google Merchant Center: Gear Icon > Conversion Settings > Auto Tagging: ON

With the above setup, your GA data *should* look like Google expects it to. I’m not sure however, how all this plays out with GA4. But the above setup *should* also work.

Best,
Alex

Like

I have noticed a new code at the end of products in Googel Analytics.
&currency=USD& utm_medium=organic&Set Parameter=shopping

Like

I was also having issues with the elipse: “…” . I tried copying a few of the examples in the comments but what finally worked for me at least, was copying the segment, removing the three dots, and manually typing them back in. Hope this helps someone.

Like

Dear Alex Czartoryski, first of all thanks so much for this blog, it really helped a lot to fix the issue with the SAG-ORGANIC links. When i´m looking at the preview links in the Merchant Center Rules it shows the correctly adjusted links, so your guide worked out there.

However as the feed is populating for my Google Shopping Ads in the Google Ads console i still have the old/wrong Links in there. Why is the Merchant Center not sending the new/updated links to Google Ads?

Thanks
Philip

Like

What about for the new Merchant Center Feature under Conversion Settings? How should we deal with that? I.E. Auto-Tagging

Link and manage your conversion sources, such as Google Analytics property, Shopify, and more, on Merchant Center. Learn more
You can view your conversion metrics when they’re ready in Performance. Go to Performance
Auto-tagging
Tag the URL that people click through from free listings
help_outline

Like

This should be turned on, and that *should* take care of properly tracking things. I haven’t yet investigated if we should strip all querystring data, or if it matters that we are setting utm tags.

Like

So do I use
&currency=(…)
or &currency=(. . .)

I removed the dots and typed them in and put a space between each of them.

Like

Apologies if this is a basic question, but I’m very new to this. After implementing this, can i conclude that transactions in Analytics tagged as “google/organic” are NOT from paid ads? Just the free listing from Google Merchant Center? TIA!

Like

I have products with variants …why can’t your regular expression in the canonical link attribute (merchant center) delete the variant and currency? (see sample)

URL canonical
https://www.mysite.com/products/saucony-uomo-azura-st-weathered-navy-s70465-2

URL in Google Merchant center before apply your rules
https://www.mysite.com/products/saucony-uomo-azura-st-weathered-navy-s70465-2?variant=40943594504341&currency=EUR&utm_medium=product_sync&utm_content=sag_organic&%20utm_medium=organic&utm_source=google&%20utm_content=Saucony+uomo+Azura+ST+Weathered+40&utm_campaign=shopping

URL in Goolge Merchant center after entering your rules
https://www.mysite.com/products/saucony-uomo-azura-st-weathered-navy-s70465-2?variant=40943594504341&currency=EUR

Thank You veri much!

Like

Hi Maurizio,

(reply updated)

1) Currency *should* be removed, but there is a bug in the regex on this post: The error is that wordress is automatically converting the three dots in “& currency = (…)” to and elipse: “…”. So the solution is to make sure that the three dots are actually three separate periods, and not a single character that looks like 3 periods (if that makes sense). I will attemt to update the post to ensure that 3 periods are used.
2) If you remove variant, any paid clicks on this product will link to the base product with default size/color/etc and NOT necessarily the size/color/etc that was displayed to the user.
3) Note that “Canonical” link in this case is different from “canonical link” from an SEO standpoint. In Google Shopping, the canonical link refers to the Canonical link for THIS VARIANT and not the canonical link for the product.

Alex

Like

1) I only uses a single currency “EUR” so i think it is correct to remove it.
How can I do? Will I delete the line “& currency = (…)” from the “Find & Replace” in Merchant Center?
2) OK, for variant better leave it

Thank You Alex!

Like

Actually, for currency, I see that I actually am trying to remove it. The error is that wordress is automatically converting the three dots in “& currency = (…)” to and elipse: “…”. So the solution is to leave “& currency = (…)” but to make sure that the three dots are actually three separate periods, and not a single character that looks like 3 periods (if that makes sense).

I’ll try to update the post now to make sure the characters show up as 3 separate periods.

Like

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

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 )

Facebook photo

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

Connecting to %s