You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have one django app hosted with multiple domains and sub-domains, and have different FACEBOOK_PIXEL_ID for all domains.
For I ues request.get_host to deside which css etc to serve for the current request.
Is it possible to allow FACEBOOK_PIXEL_ID to be passed in the tag itself {% facebook_pixel_head FACEBOOK_PIXEL_ID %}
The text was updated successfully, but these errors were encountered:
How do you currently set the FACEBOOK_PIXEL_ID in your application configuration? Wouldn't a simple if-then-else in your project settings module do the trick? e.g.
Apparently, the trick here is to get access to the request object. If that doesn't prove to be possible as some suggest you may set FACEBOOK_PIXEL_ID dynamically before the template gets processed, e.g. inside of a context processor you write yourself.
It may be worth to document such an approach in our documentation. Not sure if it makes sense to change the implementation of the template tag. If you think it is, I would suggest to try to find a generic approach for all template tags. (That said, PRs welcome!)
I have one django app hosted with multiple domains and sub-domains, and have different
FACEBOOK_PIXEL_ID
for all domains.For I ues
request.get_host
to deside which css etc to serve for the current request.Is it possible to allow FACEBOOK_PIXEL_ID to be passed in the tag itself
{% facebook_pixel_head FACEBOOK_PIXEL_ID %}
The text was updated successfully, but these errors were encountered: