-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
Source domain property directly from the request, not the context #35720
Conversation
{% if request.domain %} | ||
{% initial_analytics_data 'gtm.domain' request.domain %} |
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.
What about this? Not sure if prioritizing domain
over request.domain
is best, but seems to preserve existing behavior the best.
{% if request.domain %} | |
{% initial_analytics_data 'gtm.domain' request.domain %} | |
{% if domain or request.domain %} | |
{% initial_analytics_data 'gtm.domain' domain or request.domain %} |
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.
That's fair. I don't think there's any circumstance where we have domain data and would want to exclude it, so this is probably the best short-term fix, but is probably long-term confusing
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.
Glad I tested this -- domain or request.domain
doesn't appear to be working. My guess is django's template syntax doesn't evaluate or
the same way python does. Seeing if there's a filter we can use
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.
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.
Sorry about that! Thanks for testing.
e91fe3b
to
cf77a3c
Compare
Technical Summary
I was noticing that app preview events were setting the domain to
none
despite a domain being available. This was because the app preview's context does not include thedomain
.Feature Flag
Safety Assurance
Safety story
In my local/staging testing, this fixed the issue with app preview while preserving existing behavior for other events. The code itself should be safe, but my main fear is that we might have some code that does not populate the request's
domain
data and instead relies upon the context. I don't think this is likely, and Ajeet agreed that this change should be safe. In the worst case, we'll start receiving some events where domain is incorrectly listed asnone
, which is where the app preview currently is.Automated test coverage
No tests
QA Plan
No QA
Rollback instructions
Labels & Review