Context:
I have a website that redirects users to my app with a series of UTM parameters in the URL. At that point, I want to track an event, but I do not have a user in my app yet, so I only send the event without any user information. For some reason, the UTM parameters are not being automatically managed by Amplitude. I have two questions regarding this:
-
In other parts of my app (where the user exists), the UTM parameters are being saved automatically by Amplitude. Do I need to have a user and send user information for UTM parameters to be automatically managed by Amplitude?
-
The issue only occurs in the production environment; it works fine in a development environment. Is it possible that I need to configure something additional in the production environment?
Stack:
This is my implementation for sending events:
ampli.load({ <br /> environment: 'production',<br /> client: {<br /> configuration: {<br /> defaultTracking: {<br /> attribution: true,<br /> pageViews: false,<br /> sessions: false,<br /> fileDownloads: false,<br /> formInteractions: false,<br /> },<br /> trackingOptions: {<br /> ipAddress: false,<br /> }<br /> }<br /> }<br />});<br /><br />if (user) {<br /> ampli.identify(user.id, userProperties);<br />}<br /><br />ampli.track(event);<br />ampli.client.flush();