Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4623694
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:01:31+00:00 2026-05-22T03:01:31+00:00

Situation: There is a ecommerce platform myshop.com There is an affiliate partner that integrates

  • 0

Situation:

  • There is a ecommerce platform myshop.com
  • There is an affiliate partner that integrates a “mini shop” in an iframe with src=myshop.com/widget
  • Within the widget, I can navigate through categories and browse them
  • When clicking on a linked product, myshop.com/manufacturer/product-x opens in a new window

Complication:

  • The payment model between the affiliate partners is based on CPC, but restricted to clicks on products (which imply an “escape from the iframe” as described above)

Question:

  • How to track these clicks from the perspective of myshop.com so that they are aggregated somewhere in Google Analytics?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T03:01:32+00:00Added an answer on May 22, 2026 at 3:01 am

    The most secure way to achieve this is to ask the partners to include a query parameter with some kind of identification when including the iframe. You need this because you can’t access the outer window in order to get partner url from within the iframe. So the partners would be inserting the following code:

    <iframe src="myshop.com/widget?partner=StoreXYZ" />
    

    Now from inside the iframe just grab that query parameter and send to analytics along with the product Clicks. Try this. JQuery code.

    $('.product').click(function(){
        var product = $(this).text() || 'Unknown Product';
        var partner = document.location.search;
        try{
            partner = partner.match(/partner=([^&]+)/)[1];
        }except(e){
            partner = 'None';
        }
        _gaq.push(['_trackEvent', 'PartnerClicks', partner, product]);
    });
    

    This is just an example. I tried to get the product name and partner. And fire a Google Analytics Event when a product is clicked.

    This will give you a nice report inside Content>Event Tracking.
    You can check clicks per partner or per product, and drilldown any one into the other.

    Be warned that Google Analytics impose some limitations and if you have too many products or partners you can reach those limits.

    The limit is 50.000 unique values per report for the combination partner+product.

    So if your number of partner multiplied by the number of products exceeds 50k you may consider dropping the product part (just omit that last parameter of _trackEvent).

    If your number of partners alone exceeds the 50k limit, than you’ll have to register those interactions at some other tool, instead of Google Analytics

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my situation there is a textbox that I am typing in it and
Situation: There is a Project Resource that has many Resources A each of them
I have the following situation: There is a windows folder that has been mounted
I have the following situation: there is a table in the DB that is
Situation There is a high chance that users will not interact directly with the
Here's the situation: There's a WordPress plugin in place that enables a mobile-friendly theme
Consider the following situation: There is an xml that contains data @XmlData The @XmlData
I have the following situation: There is a tool that gets an XSLT from
Situation: There are a total of 3 packages: a package that will allow authors
We have the following situation: There is an application that works on Apache and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.