如何在所有页面中跟踪UTM参数? [英] How to track UTM parameters in all the pages?

查看:1390
本文介绍了如何在所有页面中跟踪UTM参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果用户使用到达着陆页的utm值

If the user comes with the utm values to the landing page

http://example.com/landing.php?utm_source=Facebook&utm_medium=Marketing&utm_term=FbAd& utm_content = Fad1& utm_campaign = FBFunnel

http://example.com/landing.php?utm_source=Facebook&utm_medium=Marketing&utm_term=FbAd&utm_content=Fad1&utm_campaign=FBFunnel

Landing.php 文件中,我可以获取UTM值。 Google分析将显示广告系列的结果和点击次数。如果用户导航到其他页面
- > http://example.com/contact。 PHP 即可。在contact.php中,URL中没有UTM值,Google Analytics(分析)如何跟踪来自哪个UTM Campaign的访问? 。如果我使用PHP api向第三方工具发送utm值,则意味着如何在contact.php文件中获取UTM?

In the Landing.php file I can Get the UTM values. and Google analytics will show campaign results and clicks. What if the user navigate to other page -> http://example.com/contact.php. In the contact.php there is no UTM values in the URL how would Google analytics track that visit from which UTM Campaign? . If I am using PHP api to send utm values to third party tools means How would I fetch UTMs in the contact.php file? I don't have clear idea about this Please help.

谢谢

推荐答案

您最好的选择是编写一小段javascript以将UTM值存储在cookie中,然后使用存储的值填充表单。

Your best option is to write a small piece of javascript to store the UTM values in a cookie and then populate your forms with the stored values.

如果您不想自己写一个,这个博客文章可以帮助你做到你需要的东西,还提供了一个JavaScript您可以添加到您的网站。

If you don't want to write one yourself, this blog post helps you do exactly what you need and also provides a javascript that you can add to your website.

披露:我是博客文章的作者。

这篇关于如何在所有页面中跟踪UTM参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆