Skip to content

Commit

Permalink
Strip off Google Adwords, Mailchip etc. tracking query parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
vvuksan committed Mar 28, 2017
1 parent 7234d29 commit 853e9ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/code/community/Fastly/CDN/etc/vcl_snippets/recv.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@
}
}

# Per suggestions in https://github.com/sdinteractive/SomethingDigital_PageCacheParams
# we'll strip out query parameters used in Google AdWords, Mailchimp tracking
set req.http.Magento-Original-URL = req.url;
set req.url = querystring.regfilter(req.url, "^(utm_.*|gclid|gdftrk|_ga|mc_.*)");

# If object has been marked as pass pass it
if ( req.http.X-Pass ) {
return(pass);
Expand Down

1 comment on commit 853e9ed

@kirmorozov
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not enough, some affiliate scripts are using their own parameters.
We need something similar to patch in the core:
iancassidyweb/magento2@68fdecf

Please sign in to comment.