如何将多个第三方标签 (javascripts) 合并为一个 [英] How do I combine multiple third party tags (javascripts) into one
问题描述
如何将多个第三方标签 (javascripts)(例如 Google Analytics)和其他各种第三方服务提供商 javascript 标签组合成一个托管在我们服务器上的标签?
How do I combine multiple third party tags (javascripts) like Google Analytics and other various third party service provider javascript tags into one hosted on our server ?
我们的想法是为客户站点设置我们的"标签,同时允许我们远程更新这些脚本的组合,而无需将来访问他们的服务器.
The idea is to set "our" tag to customers sites while allowing us to remotely update the combination of those scripts without having to access their servers in the future.
在加载我们的"标签后允许远程加载这些第三方脚本的最简单机制是什么?
What mechanism is the simplest to allow loading these third party scripts remotely after having "our" tag loaded?
推荐答案
您可以使用 iframe 调用特定页面,如
You can use an iframe that calls a specific page like
<iframe src="example.com/userID">
服务器应该返回正确的 html.
The server should return the correct html.
然后我将充满分析实用程序.但是,您将很难访问父 DOM 元素.
I will then be filled with the analytics utilities. You will have a hard time accessing the parent DOM element though.
这篇关于如何将多个第三方标签 (javascripts) 合并为一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!