Running Google Analytics in iframe?

前端 未结 3 1623
无人共我
无人共我 2021-02-04 04:05

Our company runs a web site (oursite.com) with affiliate partners who send us traffic. In some cases, we set up our affiliates with their own subdomain (affiliate.oursite.com),

3条回答
  •  我在风中等你
    2021-02-04 05:09

    Sorry, but it's not going to work. The reason is because Google Analytics uses first-party cookies. This means the cookies that GA sets are specific to the domain the code is on. In your case, the iFrame is on a third-party domain. This means you're going to have two sets of GA cookies (one set for each domain), and no real way to reconcile the data.

提交回复
热议问题