Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ads not delivered sometimes on client side routing #149

Open
eltonjothi opened this issue May 29, 2019 · 4 comments
Open

Ads not delivered sometimes on client side routing #149

eltonjothi opened this issue May 29, 2019 · 4 comments
Labels

Comments

@eltonjothi
Copy link

eltonjothi commented May 29, 2019

Ads do not get displayed while routing through client side for my SPA

Added an example below:
Keep switching between the pages Ad1 and ad2..
after switching pages 2-4 times, the ads stop loading
https://codesandbox.io/s/helloworld-ucyql?fontsize=14

@eltonjothi
Copy link
Author

added a sandbox example

@jaanauati
Copy link
Owner

I see the issue, It seems like dfp is returning empty ads after the third / fourth load, the problem seem to be that react-dfp is not explicitly refreshing the correlator id.

You can workaround this by running the following code when the url changes:

DFPManager.getGoogletag().then(googletag =>
      googletag.pubads().updateCorrelator()
    );

I forked your example and added the patch to index.js so you can see this working:
https://codesandbox.io/s/helloworld-lwjb2

I'm keeping this ticket opened until a better / long-term solution is implemented and please let me know if u still have issues.

Thanks.

@jaanauati jaanauati added the bug label Jun 1, 2019
@eltonjothi
Copy link
Author

Thanks..!! this works and will do for now :)..
Although updateCorrelator seems to be deprecated, Looking forward for a better solution

@jaanauati jaanauati mentioned this issue Jun 9, 2019
@asimqt
Copy link

asimqt commented Mar 11, 2020

@jaanauati any update on this? As updateCorrelator is deprecated, what should be the correct way of handling client side navigation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants