Skip to content

Klaviyo

The Klaviyo/Relewise integration allows you to perform swift and personalized product recommendations in your email marketing, as well as keeping up with user behavior through Relewise's integration to Klaviyo's marketing automation features.

This article details how to ensure that Klaviyo users are registered in Relewise when they click through a personalized recommendation to the website. For instructions on how to install the Kalviyo/Relewise integration, please reach out to us directly.

Connecting Klaviyo ID to Relewise User-object

When a Klaviyo marketing email containing Relewise Recommendations is sent out, it is mapped to a User-object with an associated email address and a Klaviyo ID.

image

When a user clicks through a Recommendation to the site, Klaviyo automatically appends the Klaviyo ID in the URL, like so:

https://...?klaviyo_id=XXXXXXXXXXPD1B6T3DFKZP1RKG&_kx=Px4LLxvkR0qDdL9G5MemGmaaothn6D8mx521A1BZJWg%3D.SfDmgw

Fetching the Klaviyo ID

Klaviyo only appends the Klaviyo ID to the URL if the user clicks through a Relewise Recommendation. Any other link will include an "exchange ID" instead.

To ensure that Klaviyo always sends the Klaviyo ID, refer to this section

 

In order to connect the recipient of the newsletter to the user of the website, use a UserUpdateRequest containing the standard tracking implementation (Temporary, Authenticated), and append the Klaviyo ID as an Identifier:

json
"User": {
  "TemporaryId": "idFromCookie",
  "AuthenticatedId": "idFromLoginIfLoggedIn",
  "Identifiers": {
    "KlaviyoID": "idFromQueryNamed:klaviyo_id"
  }   
}

Relewise furthermore recommends appending the user's email address to the User-object where possible, ideally:

  • During Login.
  • When signing up for the newsletter.
  • During checkout.

This can be accomplished with a similar UserUpdate:

json
"User": {
  "TemporaryId": "idFromCookie",
  "AuthenticatedId": "idFromLoginIfLoggedIn",
  "Email": "user@email.com"
}

A full UserUpdateRequest incorporating the email and Klaviyo IDs of the user could look something like this:

ts
var tracker = new Tracker(new Guid("datasetId"), "apiKey");

User user = User.ByAuthenticatedId("idFromLoginIfLoggedIn", "idFromCookie");
User user = User.ByTemporaryId("idFromCookie");
user.Email = "user@email.com";
user.Identifiers["KlaviyoID"] = "idFromQueryNamed:klaviyo_id";

await tracker.TrackAsync(new UserUpdate(user), token);

Ensuring a Klaviyo ID

It is possible to configure Klaviyo to always include the correct Klaviyo ID in its inbound email links. To do so, navigate to the first step of the Klaviyo campaign and locate the Tracking section. Here, you can add a UTM parameter, like so:

Add the Klaviyo ID to the UTM parameters for optimal tracking

Don't know us? Don't worry - you can find more information about us, by visiting our main page www.relewise.com