如何检查网站有google分析或不使用CURL? [英] How to check site have google analytics or not using CURL?

查看:143
本文介绍了如何检查网站有google分析或不使用CURL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要检查是否给予网站使用google分析或不在PHP

I need to check is given website use google analytics or not in PHP

推荐答案

您可能不能可靠因为它可以在网站使用的任何脚本中执行。

You probably can't do it reliably because it could be bured in any script the site uses.

但是,大多数人都遵循Google Analytics(分析)提供的示例代码。如果这足够接近,只需获取HTML内容与cURL并解析它的JavaScript代码块。

However, most people do follow the example code that Analytics provides. If that is close enough, just get the HTML content with cURL and parse it for that block of JavaScript code.

这篇关于如何检查网站有google分析或不使用CURL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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