Google Analytics can't track 100% sessions correctly with UTMs and Google Ads automatic tagging
I am having problems to track sessions correctly with GA (google ads automatic tagging and UTMs). I contacted Google and they said that theres a JS that rewrites the URL before the GA code can parse it. I don't know how to identify and remove that JS code, or fix this problem with another way. What should I do?
Here's exactly what Google told me:
"Loss of parameters by redirection The website trendotrends.com is not
holding navigation parameters because of the structure in which it was
developed. To verify this redirection, simply replicate the following
steps: 1- I accessed the link
https://trendotrends.com/products/running-shoes?variant=15320930779194
2- After full site loading, I added the &gclid=Tester123 parameter to
the URL (in the browser, so the final URL was
https://trendotrends.com/products/running-shoes?variant=15320930779194&gclid=Tester123)
and hit Enter 3- To understand if there is a redirect, the normal
behavior would be for the URL to remain the same (with
&gclid=Tester123 at the end), but in this case, the parameter
disappears (and hence the assignment)
This link was just an example, which can be verified in several other
products of the site.
There is javascript on the page that essentially rewrites the URL
before the GA code can parse it."
I think I got where is the problem, the theme automatically adds the product variant to the URL. For exemple, if I try to go to:
https://trendotrends.com/collections/trends/products/inception-totem-kit
It automatically adds (redirects) ?variant... at the end:
https://trendotrends.com/collections/trends/products/inception-totem-kit?variant=13945330073658
And I guess somehow its causing the removal of the tags on the URL. When I test on other pages, that doesnt have a variant (non product pages), the tags are kept. Exemple:
https://trendotrends.com/pages/contact?gclid=Tester123
Have anyone experienced something like that? Is google's answer a good guideline?
javascript redirect
add a comment |
I am having problems to track sessions correctly with GA (google ads automatic tagging and UTMs). I contacted Google and they said that theres a JS that rewrites the URL before the GA code can parse it. I don't know how to identify and remove that JS code, or fix this problem with another way. What should I do?
Here's exactly what Google told me:
"Loss of parameters by redirection The website trendotrends.com is not
holding navigation parameters because of the structure in which it was
developed. To verify this redirection, simply replicate the following
steps: 1- I accessed the link
https://trendotrends.com/products/running-shoes?variant=15320930779194
2- After full site loading, I added the &gclid=Tester123 parameter to
the URL (in the browser, so the final URL was
https://trendotrends.com/products/running-shoes?variant=15320930779194&gclid=Tester123)
and hit Enter 3- To understand if there is a redirect, the normal
behavior would be for the URL to remain the same (with
&gclid=Tester123 at the end), but in this case, the parameter
disappears (and hence the assignment)
This link was just an example, which can be verified in several other
products of the site.
There is javascript on the page that essentially rewrites the URL
before the GA code can parse it."
I think I got where is the problem, the theme automatically adds the product variant to the URL. For exemple, if I try to go to:
https://trendotrends.com/collections/trends/products/inception-totem-kit
It automatically adds (redirects) ?variant... at the end:
https://trendotrends.com/collections/trends/products/inception-totem-kit?variant=13945330073658
And I guess somehow its causing the removal of the tags on the URL. When I test on other pages, that doesnt have a variant (non product pages), the tags are kept. Exemple:
https://trendotrends.com/pages/contact?gclid=Tester123
Have anyone experienced something like that? Is google's answer a good guideline?
javascript redirect
add a comment |
I am having problems to track sessions correctly with GA (google ads automatic tagging and UTMs). I contacted Google and they said that theres a JS that rewrites the URL before the GA code can parse it. I don't know how to identify and remove that JS code, or fix this problem with another way. What should I do?
Here's exactly what Google told me:
"Loss of parameters by redirection The website trendotrends.com is not
holding navigation parameters because of the structure in which it was
developed. To verify this redirection, simply replicate the following
steps: 1- I accessed the link
https://trendotrends.com/products/running-shoes?variant=15320930779194
2- After full site loading, I added the &gclid=Tester123 parameter to
the URL (in the browser, so the final URL was
https://trendotrends.com/products/running-shoes?variant=15320930779194&gclid=Tester123)
and hit Enter 3- To understand if there is a redirect, the normal
behavior would be for the URL to remain the same (with
&gclid=Tester123 at the end), but in this case, the parameter
disappears (and hence the assignment)
This link was just an example, which can be verified in several other
products of the site.
There is javascript on the page that essentially rewrites the URL
before the GA code can parse it."
I think I got where is the problem, the theme automatically adds the product variant to the URL. For exemple, if I try to go to:
https://trendotrends.com/collections/trends/products/inception-totem-kit
It automatically adds (redirects) ?variant... at the end:
https://trendotrends.com/collections/trends/products/inception-totem-kit?variant=13945330073658
And I guess somehow its causing the removal of the tags on the URL. When I test on other pages, that doesnt have a variant (non product pages), the tags are kept. Exemple:
https://trendotrends.com/pages/contact?gclid=Tester123
Have anyone experienced something like that? Is google's answer a good guideline?
javascript redirect
I am having problems to track sessions correctly with GA (google ads automatic tagging and UTMs). I contacted Google and they said that theres a JS that rewrites the URL before the GA code can parse it. I don't know how to identify and remove that JS code, or fix this problem with another way. What should I do?
Here's exactly what Google told me:
"Loss of parameters by redirection The website trendotrends.com is not
holding navigation parameters because of the structure in which it was
developed. To verify this redirection, simply replicate the following
steps: 1- I accessed the link
https://trendotrends.com/products/running-shoes?variant=15320930779194
2- After full site loading, I added the &gclid=Tester123 parameter to
the URL (in the browser, so the final URL was
https://trendotrends.com/products/running-shoes?variant=15320930779194&gclid=Tester123)
and hit Enter 3- To understand if there is a redirect, the normal
behavior would be for the URL to remain the same (with
&gclid=Tester123 at the end), but in this case, the parameter
disappears (and hence the assignment)
This link was just an example, which can be verified in several other
products of the site.
There is javascript on the page that essentially rewrites the URL
before the GA code can parse it."
I think I got where is the problem, the theme automatically adds the product variant to the URL. For exemple, if I try to go to:
https://trendotrends.com/collections/trends/products/inception-totem-kit
It automatically adds (redirects) ?variant... at the end:
https://trendotrends.com/collections/trends/products/inception-totem-kit?variant=13945330073658
And I guess somehow its causing the removal of the tags on the URL. When I test on other pages, that doesnt have a variant (non product pages), the tags are kept. Exemple:
https://trendotrends.com/pages/contact?gclid=Tester123
Have anyone experienced something like that? Is google's answer a good guideline?
javascript redirect
javascript redirect
asked Nov 12 at 18:41
Fernando
174
174
add a comment |
add a comment |
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53268222%2fgoogle-analytics-cant-track-100-sessions-correctly-with-utms-and-google-ads-au%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53268222%2fgoogle-analytics-cant-track-100-sessions-correctly-with-utms-and-google-ads-au%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown