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:
- "@amplitude/analytics-browser": "~2.8.1"
- "@amplitude/ampli": "~1.35.0"
This is my implementation for sending events:
ampli.load({
environment: 'production',
client: {
configuration: {
defaultTracking: {
attribution: true,
pageViews: false,
sessions: false,
fileDownloads: false,
formInteractions: false,
},
trackingOptions: {
ipAddress: false,
}
}
}
});
if (user) {
ampli.identify(user.id, userProperties);
}
ampli.track(event);
ampli.client.flush();