简体   繁体   English

如何在 Google Analytics(分析)4 (GA4) 媒体资源中添加引荐排除项

[英]How to add referral exclusions in Google Analytics 4 (GA4) properties

We have a website which uses a Stripe hosted payment page, so the user is taken to stripe.com for payment and then redirected to our website.我们有一个使用 Stripe 托管支付页面的网站,因此用户被带到 stripe.com 进行支付,然后重定向到我们的网站。 In Universal Analytics we can add 'Referral exclusions' to ignore this in the report so that our referral data is correct.在 Universal Analytics 中,我们可以添加“推荐排除”以在报告中忽略这一点,以便我们的推荐数据正确。 Ie it doesn't start a new session every time someone makes a payment.即,每次有人付款时,它都不会启动新的 session。

https://support.google.com/analytics/answer/2795830?hl=en https://support.google.com/analytics/answer/2795830?hl=en

In our new GA4 property this isn't possible (it's not a feature of GA4).在我们的新 GA4 属性中,这是不可能的(这不是 GA4 的功能)。 And all of our payments from Stripe have an 'ourwebsite.com' referral.我们从 Stripe 支付的所有款项都有一个“ourwebsite.com”推荐。 All the payments in PayPal which stays onsite have the correct referral Email, Ads etc.留在现场的 PayPal 中的所有付款都有正确的推荐 Email、广告等。

After looking at some solutions I have tried to add the following (independently) to the payment success page (after Stripe).在查看了一些解决方案后,我尝试将以下内容(独立)添加到付款成功页面(在 Stripe 之后)。 But neither is working.但两者都不起作用。

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('set', {'page_referrer': null});

AND

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('set', {'page_referrer': 'https://ourwesbite.com/payment/gateway'});

Any help would be appreciated.任何帮助,将不胜感激。

Looks like Google has rolled out the feature to support this functionality now.看起来谷歌现在已经推出了支持这个功能的功能。

https://support.google.com/analytics/answer/10327750?ck_subscriber_id=750579406 https://support.google.com/analytics/answer/10327750?ck_subscriber_id=750579406

You can either configure unwanted referrals in the GA admin.您可以在 GA 管理员中配置不需要的推荐。

Or you can set ignore_referrer=true for individual events as per this article.或者,您可以根据本文为单个事件设置 ignore_referrer=true。

gtag('config', 'G-XXXXXXX', {
  ignore_referrer: 'true'
});

Would adding the stripe domain to the "Configure Your Domains" setting under the Data Streams resolve this?将条带域添加到数据流下的“配置您的域”设置可以解决这个问题吗?

Go to Admin > Data Streams > Select your data stream > More tagging settings > Configure your domains Go 至管理员 > 数据流 > Select 您的数据 stream > 更多标记设置 > 配置您的域

暂无
暂无

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

相关问题 Google Analytics Data API (GA4) 如何使用runRealtimeReport function? - Google Analytics Data API (GA4) How to use runRealtimeReport function? 如何为 GOOGLE ANALYTICS 4 设置 Google Opt Out Cookie - 不是通用的 - 新的 ga4 - How to set an Google Opt Out Cookie FOR GOOGLE ANALYTICS 4 - not universal one - the new ga4 如何在服务器上使用新的 Google Analytics (GA4) 设置自定义事件跟踪? - How to setup custom event tracking with new Google Analytics (GA4) on the server? 使用新的 Google Analytics 4 (GA4) 服务器端进行跟踪 - Tracking with the new Google Analytics 4 (GA4) server-side 是否仍然可以在 Google Analytics 4 (GA4) 中匿名化用户的 IP? - Is it still possible to anonymize the user's IP in Google Analytics 4 (GA4)? 在 Google 跟踪代码管理器和 Google Analytics 4 (GA4) 中手动触发 page_view 的规范方法是什么? - What is the canonical way to manually fire page_view in Google Tag Manager and Google Analytics 4 (GA4)? 如何在没有 Google Tag Manager 的情况下以编程方式将事件发送到 GA4? - How to programatically send an event to GA4 without Google Tag Manager? 从 Google Analytics 数据 API (GA4) 获取实时信息,例如 UsersBysource、EventCountByEventName 和 eventParamerts - Get realtime information from Google Analytics Data API (GA4) like UsersBysource, EventCountByEventName and eventParamerts Google Analytics(分析)初始推荐人丢失 - Google Analytics initial referral lost Google Analytics(分析)ga setVar? - Google Analytics ga setVar?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM