Skip to main content

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:

  1. 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?

  2. 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();

 

Hi Kelvin,

Thank you for contacting Amplitude Support. Happy to help!

If I understand correctly, you are experiencing issues with UTM parameters not being automatically tracked by Amplitude in your production environment. There should be no difference in how UTM parameters are tracked between your development and production environments, provided that the same configuration is used.

To help us investigate this further, could you please provide us with links to a few example users in your development and production environments? Specifically, we're looking for users where UTM parameters are being tracked in the development environment but not in the production environment.

Looking forward to your response!

Best regards,
Thao


P.S. Checkout upcoming events and user meetups on our events page.

Reply