简体   繁体   English

Paypal Tracking IN GA不起作用,代码混乱

[英]Paypal Tracking IN GA doesnt work and code is messed

after two weeks of frustration. 经过两周的挫折。 I have no clue yet what to do with this issue. 我还不知道如何处理这个问题。 since I have no access to the backend and its something not standard like WP or Open Source Code. 因为我无权访问后端及其不标准的东西,例如WP或开源代码。

I am facing a common issue: Tracking correctly the transactions paid via Paypal, through Analytics. 我面临一个常见的问题:正确跟踪通过贝宝(Paypal),Google Analytics(分析)支付的交易。 For some reason it doesnt track properly, and I can not determine the source or flow and/or transaction IDs in GA. 由于某种原因,它无法正确跟踪,因此我无法确定GA中的来源或流程和/或交易ID。 There is a placement of the Google Tag Manager and GA / GU BUt now the code has been messed up. 现在,代码已被弄乱了,其中放置了Google跟踪代码管理器和GA / GU BUt。 GA and GTM are not working anymore. GA和GTM不再起作用。

Which in my belief is placed wrong, as it gives me a conflict. 我认为这是错误的,因为它给我带来了冲突。

There is only one buy button shown here on this page: https://www.naturvel.com/checkout When buying, it goes to paypal, as usual.after the redirection: it ends here: https://www.naturvel.com/confirmation 这里有显示此页面上只有一个购买按钮: https://www.naturvel.com/checkout买的时候,它关系到贝宝,被挑选重定向:它在这里结束: HTTPS://www.naturvel。 com / confirmation

All i see in the GA backend is the following: a four digit transaction ID, which I dont want, for all payments. 我在Google Analytics(分析)后端中看到的全部是:我不希望用于所有付款的四位数交易ID。 the PayPal payments should be shown the transaction IDS from paypal source. PayPal付款应显示来自Paypal来源的交易IDS。

I have solved this issue before in a more dynamic environment, but not here. 我已经在一个更加动态的环境中解决了这个问题,但是在这里还没有解决。

Any ideas? 有任何想法吗?

On your website, especially on your confirmation page the dataLayer is below your Google Tag Manager code, which means the earliest point GTM will see the data is when the DOM is loaded. 在您的网站上,尤其是在确认页面上,dataLayer位于Google跟踪代码管理器代码下方,这意味着GTM最早会在加载DOM时看到该数据。 I'm not sure it will read a dataLayer declaration at this point, usually you declare the dataLayer above the GTM snippet and use dataLayer.push({'key':'value') to add new data. 我不确定此时是否会读取dataLayer声明,通常是在GTM代码段上方声明dataLayer并使用dataLayer.push({'key':'value')添加新数据。

If you do not receive transaction data it's most likely because your tracking has already been executed before the data turns up in the code. 如果您没有收到交易数据,则最有可能是因为在代码中出现数据之前已经执行了跟踪。 Move the dataLayer before the GTM snippet and you should be fine. 将dataLayer移到GTM代码段之前,您应该会很好。

Also Google Tag Assistant complains that your Account ID is not valid, but that might be just a quirk of the Tag Assistant (happens sometimes with unpublished containers). 此外,Google Tag Assistant抱怨您的帐户ID无效,但这可能只是Tag Assistant的一个怪癖(有时会出现未发布的容器)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM