Skip to main content

Tracking code for triggering a welcome email

Description

To trigger welcome emails, Retail Rocket has a special method that is responsible for sending the desired trigger scenario. Before calling the welcomeSequence method, the user must be subscribed to mailings using the setProfile tracking code.

Note
  • The logic for sending one welcome email for one email must be supported by the store on its side.

  • Retail Rocket will send as many welcome emails as it receives calls to the welcomeSequence tracking code.

  • The minimum delay for sending an email to a single user is 1 minute.

  • Emails in this scenario have no sending restrictions (48 hours). Thus, they can be sent, for example, along with an abandoned view.

Region ID

<stock_id> - region identifier, can be a string. Must match the region identifier passed in the product database.

Code example

<script type = "text/javascript">
(window["rrApiOnReady"] = window["rrApiOnReady"] || []).push(function() {
try {
rrApi.setProfile({
"email": "<user_email>",
"isAgreedToReceiveMarketingMail": true
});
rrApi.welcomeSequence("<user_email>");
} catch (e) {}
})
</script>