Solved

Shopify User ID - emails sent in different case

  • 20 November 2022
  • 7 replies
  • 139 views

Userlevel 1
Badge

Shopify’s client-side integration looks to be sending the email in lowercase while the server-side integration does no case transformation.

This is a problem because:
Amplitude User IDs are case-sensitive. If you set a user ID in a different case, Amplitude will track two separate profiles for the same user.

icon

Best answer by Yuanyuan Zhang 23 November 2022, 17:02

View original

7 replies

Userlevel 1
Badge

I believe the solution might be to remove the json filter on this line of the amplitude.liquid snippet but I haven’t tested this yet:

email: {{customer.email | json}},

 

Update: just tested and no, that didn’t help.

Userlevel 3
Badge +2

Thanks for following up @Jacobt. Were you able to make progress?

Userlevel 5
Badge +5

Hi @Jacobt

Thank you for writing this post!

You are correct that Amplitude User IDs are case-sensitive and if the same ID is sent in with different cases, Amplitude will not be able to merge them.

Going forward, I would suggest sending new User IDs as lower case to Amplitude, so that it will not affect future data. 

For existing data, we are not able to change the existing User IDs on Amplitude. One workaround is to download all data using our Export API, map existing users to their new User IDs, and using our HTTP API to backfill all historical data into a new project. Here is our Export API documentation: https://www.docs.developers.amplitude.com/analytics/apis/export-api/.

Here is our Self Data Backfill Guide: https://www.docs.developers.amplitude.com/analytics/data-backfill-guide/.

I hope this clarifies!

 

Userlevel 1
Badge

Hi Yuanyuan,

The Shopify app itself is sending the emails server-side with both upper and lower case letters. I don’t have access to change these app settings, I can only change certain options on the client-side events as these are controlled by snippets of code injected into my store’s theme.

That’s an official app published by Amplitude. Could you please raise this bug internally with the relevant department?

Userlevel 5
Badge +5

Hi @Jacobt

Thanks for letting me know! I will convert this post into a ticket and follow up with you via email! 

Best,

Userlevel 3
Badge +5

Hi All,

Just wanted to give you all an update that our Engineering team has changed the Shopify plug-in from our side. With this release, future events from the Shopify plug-in will no longer be converted to lower case and should match the original email case, as well as merge with the correct user.

Hope this helps!

Best,

Thao

Userlevel 1
Badge

Amazing! Thanks for fixing so quickly.

Reply