Using the rudder-sdk-js v2.35.0, I'm seeing some o...
# support
g
Using the rudder-sdk-js v2.35.0, I'm seeing some odd behavior with my SPA (vue.js) and am not sure if its on purpose or not If I visit a page with campaign parameters, the first several events track correctly with
context.campaign
values But after browsing for a couple minutes the context starts calculating campaign values off the current url instead of the initial url - so future events from that SPA session have a blank campaign since I remove the utm query params on future page loads. Is there something I need to do to make sure that Rudderstack does not recompute the context like this?
a
I think that’s actually normal behavior. There should be an initial campaign field on the user that persists
g
If I have destinations that listen for a
purchase
event, they won't know the campaign that caused it
a
Depending on the destination you’d just need to look at the user property vs the event property. Which are you using?
g
Mostly Bigquery, where I can join to an initial event like you mention But for other cloud destinations like Iterable, I'd like to be able to send the UTM parameters or use them in a transformation - which doesn't seem possible if
campaign
overwrites itself in the middle of a session
a
ah you know what, I don't think rudderstack sets the initial UTM fields like I thought - even on the user. some destinations will do this for you as long as you're identifying users properly. currently, using posthog with a client and they will maintain / resolve that entire history for you. you can also reingest posthog to the same DW and use that (or another destination) to help with attribution (this is what I'm currently doing as a work around - confused myself that rudderstack was actually doing this vs posthog) otherwise, I know rudderstack has the "Profiles" product which is in beta that should achieve this (guessing this will be a $$$ offering similar to Segment's Unify product) or you can build your own attribution modeling from scratch (tons of work) with SQL / Python or use another third party type of tool for it Also looks like they have some docs on how to do this and offer some dbt models you might be able to use: • https://www.rudderstack.com/blog/from-first-touch-to-multi-touch-attribution-with-rudderstack-dbt-and-sagemaker/https://www.rudderstack.com/blog/customer-session-analysis-using-dbt-and-rudderstack/ So in summary, think you have to lean on the destination to do this, pay for one of their premium offerings (that's coming soon), or do it yourself / rely on third party tooling At least that's what I've been able surmise from all that I'm reading. if you find an alternate solution let me know!