Active impression not converted

139 views
Skip to first unread message

Maojie Wei

unread,
Apr 28, 2021, 4:37:01 AM4/28/21
to Attribution Reporting API Dev
Hi, I tried to experiment Conversion Measurement API in Chrome. However, I was stuck in not getting active impression converted to be pending reports. Please advise. Thanks Maojie.

This is my active impressions:
Screen Shot 2021-04-28 at 1.33.55 AM.png
This is screenshot from my network tab:

Screen Shot 2021-04-28 at 1.36.31 AM.png

Message has been deleted

Maud Nalpas

unread,
Apr 28, 2021, 9:24:00 AM4/28/21
to Attribution Reporting API Dev, mw...@pinterest.com
Hi,
Thanks for reaching out!
A few potential reasons for this on top of my head why conversions are missing (@John Delaney may have ideas as well):
  • Issue with the OT token
  • Conversion data is over 3 bits (at the moment this will fail silently, but our colleagues at DevTools are working on warnings)
  • Issue with the server logics and 302 redirect request. In case it helps, this demo code is triggering conversions properly on Chrome 91.0.4472.19.
What version of Chrome are you using? Would you maybe have code snippets to share, so we can help you troubleshoot?

Maojie Wei

unread,
Apr 28, 2021, 1:04:38 PM4/28/21
to Attribution Reporting API Dev, Maud Nalpas, Maojie Wei
Hi Maud, Thanks for your reply.
  • Issue with the OT token
I did put the OT token on the head section.

<head>
  <meta charset="utf-8">
  <title>The HTML5 Herald</title>
  <meta http-equiv="origin-trial" content="A8wkANl7wyexjyo1WmIAYmBQkzmu9DlU8z/vtVDgrNSPr3b3G8mruMxWeZR4NZsL+7i8CUDlnhvPKTDpf2p0MwsAAACFeyJvcmlnaW4iOiJodHRwczovL3d3dy5wY21wcmVwLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjI2MjIwNzk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnXXXXXXX">
</head>

  • Conversion data is over 3 bits (at the moment this will fail silently, but our colleagues at DevTools are working on warnings)
I set the conversion data as 01.
  • My code snippets
<?php

header("HTTP/1.1 302 Found");
header("Access-Control-Allow-Headers: *");

header("Cache-Control: no-cache, no-store, must-revalidate");

$user_agent = $_SERVER['HTTP_USER_AGENT'];

if (stripos( $user_agent, 'Chrome') !== false){
  echo "Google Chrome";

  if (isset($_GET["conversionData"]) && isset($_GET["priority"])) {
    header("Location: /.well-known/register-conversion/" . $_GET["conversionData"] . "/" . $_GET["priority"]);
  } else if (isset($_GET["conversionData"])) {
    header("Location: /.well-known/register-conversion/" . $_GET["conversionData"] . "/");
  }

?>

  • Chrome version - Version 90.0.4430.85 (Official Build) (x86_64)
Thanks.
Maojie


John Delaney

unread,
Apr 28, 2021, 1:10:10 PM4/28/21
to Attribution Reporting API Dev, mw...@pinterest.com, Maud Nalpas
Hi,

The conversion registration redirect's path + query should be of the form: /.well-known/register-conversion?conversion-data=...

It looks like you are providing: .well-known/register-conversion/XX/
which Chrome cannot handle.


Let me know if I misunderstood anything, thanks!

John

Maojie Wei

unread,
Apr 28, 2021, 1:21:53 PM4/28/21
to Attribution Reporting API Dev, john...@chromium.org, Maojie Wei, Maud Nalpas
I did change the redirect's path to be the form of https://www.pcmprep.com/.well-known/register-conversion/?conversion-data=01

<?php

header("HTTP/1.1 302 Found");
header("Access-Control-Allow-Headers: *");
header("Cache-Control: no-cache, no-store, must-revalidate");

$user_agent = $_SERVER['HTTP_USER_AGENT'];
if (stripos( $user_agent, 'Chrome') !== false){
  echo "Google Chrome";

  header("Location: /.well-known/register-conversion?conversion-data=" . $_GET["conversionData"]);

?>

However, Chrome won't return 302 status code for redirect page somehow, it will show finished status for me and then would be stuck there. When I visit the redirect path directly, the redirect is fine. Any advice? Thanks.

Screen Shot 2021-04-28 at 10.18.59 AM.png

John Delaney

unread,
Apr 28, 2021, 1:40:17 PM4/28/21
to Attribution Reporting API Dev, mw...@pinterest.com, John Delaney, Maud Nalpas
Do you have an example page which we could look at and try to reproduce?

On the page that is registering the conversion, I would verify that document.featurePolicy.features().includes("conversion-measurement") returns true. This will ensure the OT is setup properly.
Message has been deleted

Maojie Wei

unread,
Apr 28, 2021, 2:37:46 PM4/28/21
to Attribution Reporting API Dev, john...@chromium.org, Maojie Wei, Maud Nalpas
Hi John,

I did verify and it returned true.
Screen Shot 2021-04-28 at 11.35.36 AM.png

This is my example page. Thanks.

John Delaney

unread,
Apr 28, 2021, 3:09:56 PM4/28/21
to Attribution Reporting API Dev, mw...@pinterest.com, John Delaney, Maud Nalpas
Thanks!

The issue is that your conversion registration request goes to "www.pcmprep.com" whereas you register "pcmprep.com" as the reporting origin. Chrome sees these as two distinct origins. While it handles the conversion registration redirect, it cannot associate it back to the impression.

Removing the "www." from the registration request, or adding it to the reportingorigin attribute on the <a> element should fix the issue.
Message has been deleted

Maojie Wei

unread,
Apr 28, 2021, 3:41:12 PM4/28/21
to Attribution Reporting API Dev, john...@chromium.org, Maojie Wei, Maud Nalpas
Thanks. John. 

So I need to register for a different origin token that will goes to "pcmprep.com". Is that correct?

Maojie Wei

unread,
Apr 28, 2021, 3:45:50 PM4/28/21
to Attribution Reporting API Dev, Maojie Wei, john...@chromium.org, Maud Nalpas

Another issue is that Chrome stops storing the active impression for me in chrome://conversion-internals/. I compared my <a> element with the example and didn't find the suspicious. 
  <a id="ad" impressiondata="200400600"  conversiondestination="https://damaipin.blogspot.com" reportingorigin="https://pcmprep.com" impressionexpiry="864000000" href="https://damaipin.blogspot.com/2021/04/pcm-advertiser.html" target="_blank">ECM - advertiser on blogger</a>

Or there is delay for active impressions to show up on chrome://conversion-internals/? I didn't see these impressions when I tested them 30 minutes ago and now they showed up. However, I couldn't see my last several clicks here.

Screen Shot 2021-04-28 at 12.45.33 PM.png

John Delaney

unread,
Apr 28, 2021, 3:54:59 PM4/28/21
to Attribution Reporting API Dev, mw...@pinterest.com, John Delaney, Maud Nalpas
> So I need to register for a different origin token that will goes to "pcmprep.com". Is that correct?

I'm not sure if that is necessary. If you are just changing the conversion http request to not include www., that should not be necessary. There is no need for Origin Trial tokens to match any of the origins supplied to API calls. If the origin trial is enabled in a document, you can register conversions for any origin.

The same can be said for changing the origins supplied to the <a> element attributes.

> Or there is delay for active impressions to show up on chrome://conversion-internals/? I didn't see these impressions when I tested them 30 minutes ago and now they showed up. However, I couldn't see my last several clicks here.

There should not be a delay however chrome://conversion-internals only auto-refreshes the data every few minutes. If you click on the link, then tab switch to chrome://conversion-internals, it may not show up because the page has not refreshed. You will need to either refresh the page manually, or click "Refresh all page data".

If after doing this the rows do not show up, there may be an issue.

Maojie Wei

unread,
Apr 28, 2021, 4:34:15 PM4/28/21
to Attribution Reporting API Dev, john...@chromium.org, Maojie Wei, Maud Nalpas
I tried to refresh the page and clicked  "Refresh all page data", the rows still do not show up...

Maojie Wei

unread,
Apr 28, 2021, 8:12:55 PM4/28/21
to Attribution Reporting API Dev, Maojie Wei, john...@chromium.org, Maud Nalpas
Hi John, I fixed the active impression issue. However, still no pending reports showed up in chrome://conversion-internals/ after I made the registration goes to "pcmprep.com" and reportingorigin as "pcmprep.com" . Any other possible issue? Thanks.

Screen Shot 2021-04-28 at 5.07.42 PM.png
Screen Shot 2021-04-28 at 5.12.28 PM.png

<a id="ad" href="https://damaipin.blogspot.com/2021/04/pcm-ecm-index.html" conversiondestination="https://damaipin.blogspot.com" impressiondata="9999" reportingorigin="https://pcmprep.com" impressionexpiry="864000000" target="_parent">ECM</a>

Thanks
Maojie


Message has been deleted

Maud Nalpas

unread,
Apr 29, 2021, 12:48:15 PM4/29/21
to Attribution Reporting API Dev, mw...@pinterest.com, john...@chromium.org, Maud Nalpas
Hi Maojie,

John and I both were able to see reports with your example code, so your implementation should be alright!
See screenshot below
If you were never seeing any report show up, it may be an issue with the OT token or with some extension.

Try the following:
  • Turn on the flag #conversion-measurement-api (by visiting chrome://flags in your browser)
  • Turn on the flag #enable-experimental-web-platform-features
  • Turn off extensions -- in particular Ad blockers, that may be blocking pixel requests.
  • If you have the flag #conversion-measurement-debug-mode turned on, reports won't show up in the "Pending Reports" list, because they're sent immediately. Try turning this flag off.
How does that work out for you?


Screenshot 2021-04-29 at 18.19.35.png

Try the following:
  • Turn on the flag #conversion-measurement-api (by visiting chrome://flags in your browser)
  • Turn on the flag #enable-experimental-web-platform-features
  • Turn off extensions -- in particular Ad blockers, that may be blocking pixel requests.
  • If you have the flag #conversion-measurement-debug-mode turned on, reports won't show up in the "Pending Reports" list, because they're sent immediately. Try turning this flag off.
How does that work out for you?

Maojie Wei

unread,
Apr 29, 2021, 1:09:40 PM4/29/21
to Attribution Reporting API Dev, Maud Nalpas, Maojie Wei, john...@chromium.org
Hi Maud, thanks so much for your looking into this. 
  • If you have the flag #conversion-measurement-debug-mode turned on, reports won't show up in the "Pending Reports" list, because they're sent immediately. Try turning this flag off.
    • I did turned this on and just turned it off. Still not seeing pending reports.
    • Screen Shot 2021-04-29 at 10.01.08 AM.png
  • Turn off extensions -- in particular Ad blockers, that may be blocking pixel requests.
    • I turned off all extensions, except Okta which is managed by our company.
    • Screen Shot 2021-04-29 at 10.01.30 AM.png
  • If you were never seeing any report show up, it may be an issue with the OT token or with some extension. 
    • I've never seen any report show up, sadly.
    • I'm currently using the origin token registered with "pcmprep.com (+ subdomains)"
    • Screen Shot 2021-04-29 at 10.02.14 AM.png

Maud Nalpas

unread,
Apr 29, 2021, 1:29:09 PM4/29/21
to Attribution Reporting API Dev, mw...@pinterest.com, Maud Nalpas, john...@chromium.org
Hi Maojie,
  • Interestingly, I could reproduce the issue on Chrome 90 (but got the demo to work on version 91.0.4472.19). What exact Chrome version are you using? Can you try your demo in Chrome Beta (still with the flags on)?
  • Are you in Guest mode? If yes, change to non-Guest mode.
  • Do you have any other flag on, except from #enable-experimental-web-platform-features and #conversion-measurement-api? Turn off all other flags.
  • (I'm sure you have but just in case⏤have you restarted Chrome after changing the flags?)

John Delaney

unread,
Apr 29, 2021, 1:32:43 PM4/29/21
to Attribution Reporting API Dev, Maud Nalpas, mw...@pinterest.com, John Delaney
My mistake for not clarifying the version earlier! I was testing on Chrome 91 as well.

You are indeed running into a bug: specifically https://bugs.chromium.org/p/chromium/issues/detail?id=1185891

Conversions registered within iframes were not being handled by Chrome. This fix is included in the Chrome 91 release. 

Maojie Wei

unread,
Apr 29, 2021, 1:36:06 PM4/29/21
to Attribution Reporting API Dev, Maud Nalpas, Maojie Wei, john...@chromium.org
  • Interestingly, I could reproduce the issue on Chrome 90 (but got the demo to work on version 91.0.4472.19). What exact Chrome version are you using? Can you try your demo in Chrome Beta (still with the flags on)?
    • Version 90.0.4430.93 
      • Screen Shot 2021-04-29 at 10.35.46 AM.png
    • I just tried my demo in Chrome Beta, it worked as a charm. Thanks so much.
    • Screen Shot 2021-04-29 at 10.34.12 AM.png
  • Are you in Guest mode? If yes, change to non-Guest mode.
    • No. I'm not in Guest mode.
  • Do you have any other flag on, except from #enable-experimental-web-platform-features and #conversion-measurement-api? Turn off all other flags.
    • No. I turned off all other flags.
  • (I'm sure you have but just in case⏤have you restarted Chrome after changing the flags?)
    • Yes, I restarted Chrome. 

Maojie Wei

unread,
Apr 29, 2021, 1:38:21 PM4/29/21
to Attribution Reporting API Dev, john...@chromium.org, Maud Nalpas, Maojie Wei
Thanks John, I was testing on Chrome 90 and somehow that's the latest version I can get. Or is there a way to upgrade my Chrome to version 91. Thanks again for you and Maud.

Maud Nalpas

unread,
Apr 29, 2021, 1:41:24 PM4/29/21
to Attribution Reporting API Dev, mw...@pinterest.com, john...@chromium.org, Maud Nalpas
Hi Maojie,
You can download Chrome Beta to run version 91.
Let us know how that works!

John Delaney

unread,
Apr 29, 2021, 1:42:12 PM4/29/21
to Attribution Reporting API Dev, mw...@pinterest.com, John Delaney, Maud Nalpas
Happy to help! Chrome 90 is the current Stable version of Chrome. To test in 91, you can use the Beta channel. You can find the Chrome release schedule here: https://www.chromestatus.com/features/schedule
Reply all
Reply to author
Forward
0 new messages