何处将Google分析代码添加到php网站 [英] Where to add Google analytics code to a php website

查看:113
本文介绍了何处将Google分析代码添加到php网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将Google分析代码添加到php网站时,我是否只将代码添加到索引页,每个创建的页面,还是仅添加客户旅程中的前端页面?
最佳做法是什么?
感谢您提前做出任何回应。

解决方案

您需要分析的所有网页,正面朝前的页面。
最佳做法是创建一个文件analytics.php并粘贴代码并添加

<?php include_once( analytics.php); ?>



前往所有页面


When adding Google analytics code to a php website do I add the code to only the index page, every page created or only the front facing pages in the customer journey? What is the best practice? Thank you for any responses in advance.

解决方案

All the pages you want analytics on, add the code on the front facing pages. Best practice will be to create a file "analytics.php" and paste the code there, and add

<?php include_once("analytics.php"); ?>

To all the front facing pages

这篇关于何处将Google分析代码添加到php网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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