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

isAsyncRequest is false despite "four_labs_gamp.async_requests: true" is set in confing.yml #14

Closed
kestux opened this issue Jul 28, 2017 · 2 comments

Comments

@kestux
Copy link

kestux commented Jul 28, 2017

Hi,

During XDEBUG session I've noticed that param isAsyncRequest is set to false in TheIconic\Tracking\GoogleAnalytics\Analytics instance. I have to set $analytics->setAsyncRequest(true), to set the param to true.

My config.yml:

four_labs_gamp:
    protocol_version: 1
    tracking_id: "%google.analytics.tracking.id%"
    use_ssl: true
    anonymize_ip: false
    async_requests: true
    sandbox: %google.analytics.is.sandbox%

Also I noticed that async_requests prop is defaulted to true in FourLabs\GampBundle\DependencyInjection\Configuration::getConfigTreeBuilder() and I tried to remove is from my config, but the isAsyncRequest remained false. I think it must be something wrong with the setter.

@foaly-nr1
Copy link
Contributor

All requests default to be sent synchronously when Symfony is in debug mode so that the response from Google Analytics can be logged.

See

->setAsyncRequest($async && !$debug)

@kestux
Copy link
Author

kestux commented Jul 28, 2017

Ah, sorry I get it now.

Too late :)

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

No branches or pull requests

2 participants