You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently testing third-party measurement using the Webkit Private Click Measurement API and have set up a simulated environment on Glitch with a sample publisher site, advertiser site, and adTech site for this purpose. I have created an ad on the adTech site, which is displayed on the publisher site via an iframe. The demo can be accessed at https://c-3-publisher.glitch.me, and https://c-3-adtech.glitch.me.
One of my goals is to track the number of users who click on the ad but do not complete a conversion. To accomplish this, I need to record the click data whenever a user clicks on the ad. I have implemented a fetch request in the ad's onClick event handler to send this data to another server for recording. Below is the code for the example ad.
I followed the example code provided in the Webkit repo (webkit: //github PCM: Allow measurement of links in nested, cross-site iframes ), using target="_top" in the iframe to ensure that when users click on an ad, they are redirected to the advertiser's page instead of loading it within the iframe. However, I've encountered an issue where the fetch request fails after successfully storing a click. This seems to occur because once the ad is clicked, the browser initiates a new page load, interrupting the execution of scripts on the current page, including any incomplete asynchronous fetch requests.
As a control experiment, I also tested with target="_blank", where a new tab opens to display the advertiser's site when the user clicks the ad. While the fetch operation succeeds in this scenario, the browser does not recognize it as a valid PCM click, and no "storing a click" log appears in the console.
Based on the testing above, I have two questions regarding this issue:
Is there a workaround or solution to successfully execute the fetch request in this scenario?
Is it necessary to use target="_top" in the iframe to ensure that the browser recognizes a user's click on the iframe as a successful PCM click?
Thank you for any insights or assistance you can provide!
The text was updated successfully, but these errors were encountered:
Hi all, @Yuyan-Lei is working with the team at The Washington Post on our overall testing of various privacy measures from a publisher perspective. This question comes out of some of our tests.
Hi,
I am currently testing third-party measurement using the Webkit Private Click Measurement API and have set up a simulated environment on Glitch with a sample publisher site, advertiser site, and adTech site for this purpose. I have created an ad on the adTech site, which is displayed on the publisher site via an iframe. The demo can be accessed at https://c-3-publisher.glitch.me, and https://c-3-adtech.glitch.me.
One of my goals is to track the number of users who click on the ad but do not complete a conversion. To accomplish this, I need to record the click data whenever a user clicks on the ad. I have implemented a fetch request in the ad's onClick event handler to send this data to another server for recording. Below is the code for the example ad.
I followed the example code provided in the Webkit repo (webkit: //github PCM: Allow measurement of links in nested, cross-site iframes ), using
target="_top"
in the iframe to ensure that when users click on an ad, they are redirected to the advertiser's page instead of loading it within the iframe. However, I've encountered an issue where the fetch request fails after successfully storing a click. This seems to occur because once the ad is clicked, the browser initiates a new page load, interrupting the execution of scripts on the current page, including any incomplete asynchronous fetch requests.As a control experiment, I also tested with
target="_blank"
, where a new tab opens to display the advertiser's site when the user clicks the ad. While the fetch operation succeeds in this scenario, the browser does not recognize it as a valid PCM click, and no "storing a click" log appears in the console.Based on the testing above, I have two questions regarding this issue:
Is there a workaround or solution to successfully execute the fetch request in this scenario?
Is it necessary to use
target="_top"
in the iframe to ensure that the browser recognizes a user's click on the iframe as a successful PCM click?Thank you for any insights or assistance you can provide!
The text was updated successfully, but these errors were encountered: