question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to enable after user consent?

See original GitHub issue

Matteo, first of all thanks a lot for this awesome plugin!

I’m building a cookie banner and as per the documentation I can see how I can load the plugin with enabled: false. What is missing from the docs is how to actually enable it again after user consent - including sending the first pageview.

Can you point me into the right direction?

Thanks in advance - all the best, Sumit

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
MatteoGabrielecommented, May 6, 2020

@codeofsumit you’re welcome. sorry you had to wait this long for my response. yeah this is by design from Google, not from me. I can’t really predict what you want to do after re-enabling the property so you might need to trigger whatever you need by yourself manually. after that, whatever happens will be picked up again by the library

1reaction
codeofsumitcommented, May 6, 2020

Well ok then we have the same behaviour. The problem is that optIn() should send the first pageview immediately(!) IMO. Without navigating anywhere. Subsequent navigation is tracked fine. I’m only concerned about the first event after calling optIn().

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure how users consent to applications - Microsoft Entra
Select Azure Active Directory > Enterprise applications > Consent and permissions > User consent settings.
Read more >
Consent mode on websites and mobile apps - Analytics Help
Consent mode lets you communicate your users' cookie or app identifier consent status to Google. Tags adjust their behavior and respect users' choices....
Read more >
Manage consent settings (web) | Tags - Google Developers
It is best practice to configure the default consent settings to be region specific rather than for all visitors. This helps avoid losing...
Read more >
Firebase Analytics - Web only activate after user consent
Firebase Analytics - Web only activate after user consent · 0 · Know someone who can answer? Share a link to this question...
Read more >
User Consent and Third-Party Applications - Auth0
By default, the consent page will use the scopes' names to prompt for the user's consent. As shown below, you should define scopes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found