Add extra required data to the track_event call when creating a school#899
Add extra required data to the track_event call when creating a school#899jamiebenstead wants to merge 1 commit into
Conversation
Test coverage91.97% line coverage reported by SimpleCov. |
| 'School - Created', | ||
| school_id: @school.id, | ||
| first_landing_page: params[:first_landing_page], | ||
| marketing_parameters: marketing_parameters |
There was a problem hiding this comment.
I'm wondering if it would be easier to query in the data warehouse if all of the event properties were at the same level. It might just be harder to document and query if some are nested inside other attributes. This means we could query on events.properties['utm_source'] rather than events.properties['marketing_params']['utm_source'].
You should be able to do this by spatting the marketing parameters:
track_event('School - Created', **marketing_parameters, @school.id:, first_landing_page: params[:first_landing_page])
zetter-rpf
left a comment
There was a problem hiding this comment.
Great. added a suggestion - let me know if you think it's worth doing.
Status
Description of what's been done
first_landing_pageandmarketing_preferencedata when saving the School - Created event