New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰Don't fire STAMP ads analytics if no ads #17756
Conversation
cc/ @gmajoulet who may be working on the same issue. |
@@ -546,6 +546,13 @@ export class AmpStoryAutoAds extends AMP.BaseElement { | |||
this.uniquePageIds_[pageId] = true; | |||
} | |||
|
|||
if (this.adPagesCreated_ === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should move this check together with the uniquePagesCount_ logic to the top of this method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
if (this.adPagesCreated_ === 0) { | ||
// This is protection against us running our placement algorithm in a | ||
// story where no ads have been created. Most likely because INI_LOAD on | ||
// the story was fired very late, or not at all. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most likely because INI_LOAD on the story hasn't been fired yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I wasn't 100% sure where you wanted to register |
* exit if no ads * move order
Some analytics that were triggered by listening to page changes would break if no ad pages existed. This appears to be caused by
INI_LOAD
on the story firing very late or not at all (will file separate issue to investigate)Closes #17593