# Rokt Cloud Mode Integration



<blockquote class="announcement">
  <div class="tip-quote">
    
    <div class="tip-text"><p>The Rokt destination integration is currently in <strong>Private Beta</strong>, where we work with early users and customers to test new features and get feedback before making them generally available.</p>
<p>Reach out to <a href="mailto:support@rudderstack.com" >Customer Success</a> if you&rsquo;re interested in enabling this destination for your workspace.</p>
</div>
  </div>
</blockquote>

<p>After you have configured Rokt as a destination in RudderStack, you can send conversion events to Rokt in <a href="https://www.rudderstack.com/docs/destinations/rudderstack-connection-modes/#cloud-mode" >cloud mode</a>. Rokt supports cloud mode only for all supported source types.</p>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="track">Track</h2><p>Rokt supports only <a href="https://www.rudderstack.com/docs/event-spec/standard-events/track/" ><code>track</code></a> calls. No other call type is supported. Configure an <a href="https://www.rudderstack.com/docs/destinations/streaming-destinations/rokt/setup-guide/#event-mapping-settings" >event mapping</a> for each <code>track</code> event name you want to send.</p>
<p>A sample <code>track</code> call is shown below:</p>
<div class="rs-code">
  <div class="rs-code__head">javascript<button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-javascript" data-lang="javascript">rudderanalytics.track(&#34;Order Completed&#34;, {
  orderId: &#34;order-123&#34;,
  revenue: 49.99,
  currency: &#34;USD&#34;,
  roktClickId: &#34;click-123&#34;,
});</code></pre></div>
</div>
<!-- end-chunk -->
<!-- begin-chunk -->
<h3 id="field-reference">Field reference</h3><p>RudderStack maps the following fields to Rokt parameters. When multiple RudderStack properties are listed, RudderStack uses the first populated property. The parameter column shows the outgoing field and its containing object; some source properties are processed before delivery rather than forwarded as fields with the same name.</p>
<table>
  <thead>
      <tr>
          <th>RudderStack property</th>
          <th>Rokt parameter</th>
          <th>Description</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>context.traits.email</code> <br /> <code>traits.email</code> <br /> <code>properties.email</code></td>
          <td><code>user_identities.email</code></td>
          <td>Email address, converted to lowercase.</td>
      </tr>
      <tr>
          <td><code>userId</code></td>
          <td><code>user_identities.customerid</code></td>
          <td>Customer ID, converted to a string.</td>
      </tr>
      <tr>
          <td><code>context.traits.firstName</code> <br /> <code>context.traits.first_name</code> <br /> <code>traits.firstName</code> <br /> <code>traits.first_name</code></td>
          <td><code>user_attributes.firstname</code></td>
          <td>First name.</td>
      </tr>
      <tr>
          <td><code>context.traits.firstNameSha256</code> <br /> <code>context.traits.first_name_sha256</code> <br /> <code>traits.firstNameSha256</code> <br /> <code>traits.first_name_sha256</code></td>
          <td><code>user_attributes.firstnamesha256</code></td>
          <td>SHA-256-hashed first name.</td>
      </tr>
      <tr>
          <td><code>context.traits.lastName</code> <br /> <code>context.traits.last_name</code> <br /> <code>traits.lastName</code> <br /> <code>traits.last_name</code></td>
          <td><code>user_attributes.lastname</code></td>
          <td>Last name.</td>
      </tr>
      <tr>
          <td><code>context.traits.lastNameSha256</code> <br /> <code>context.traits.last_name_sha256</code> <br /> <code>traits.lastNameSha256</code> <br /> <code>traits.last_name_sha256</code></td>
          <td><code>user_attributes.lastnamesha256</code></td>
          <td>SHA-256-hashed last name.</td>
      </tr>
      <tr>
          <td><code>context.traits.phone</code> <br /> <code>traits.phone</code></td>
          <td><code>user_attributes.mobile</code></td>
          <td>Mobile number.</td>
      </tr>
      <tr>
          <td><code>context.traits.phoneSha256</code> <br /> <code>context.traits.phone_sha256</code> <br /> <code>traits.phoneSha256</code> <br /> <code>traits.phone_sha256</code></td>
          <td><code>user_attributes.mobilesha256</code></td>
          <td>SHA-256-hashed mobile number.</td>
      </tr>
      <tr>
          <td><code>context.traits.age</code> <br /> <code>traits.age</code></td>
          <td><code>user_attributes.age</code></td>
          <td>Age.</td>
      </tr>
      <tr>
          <td><code>context.traits.birthday</code> <br /> <code>context.traits.dateOfBirth</code> <br /> <code>context.traits.date_of_birth</code> <br /> <code>traits.birthday</code> <br /> <code>traits.dateOfBirth</code> <br /> <code>traits.date_of_birth</code></td>
          <td><code>user_attributes.dob</code></td>
          <td>Date of birth, formatted as <code>YYYYMMDD</code> when the date is valid.</td>
      </tr>
      <tr>
          <td><code>context.traits.gender</code> <br /> <code>traits.gender</code></td>
          <td><code>user_attributes.gender</code></td>
          <td>Gender.</td>
      </tr>
      <tr>
          <td><code>context.traits.address.city</code> <br /> <code>context.traits.city</code> <br /> <code>traits.address.city</code> <br /> <code>traits.city</code></td>
          <td><code>user_attributes.city</code></td>
          <td>City.</td>
      </tr>
      <tr>
          <td><code>context.traits.address.state</code> <br /> <code>context.traits.state</code> <br /> <code>traits.address.state</code> <br /> <code>traits.state</code></td>
          <td><code>user_attributes.state</code></td>
          <td>State.</td>
      </tr>
      <tr>
          <td><code>context.traits.address.postalCode</code> <br /> <code>context.traits.address.postal_code</code> <br /> <code>context.traits.zip</code> <br /> <code>traits.address.postalCode</code> <br /> <code>traits.address.postal_code</code> <br /> <code>traits.zip</code></td>
          <td><code>user_attributes.zip</code></td>
          <td>Postal code.</td>
      </tr>
      <tr>
          <td><code>context.traits.title</code> <br /> <code>traits.title</code></td>
          <td><code>user_attributes.title</code></td>
          <td>Title.</td>
      </tr>
      <tr>
          <td><code>context.locale</code> <br /> <code>context.traits.language</code> <br /> <code>traits.language</code></td>
          <td><code>user_attributes.language</code></td>
          <td>Language or locale.</td>
      </tr>
      <tr>
          <td><code>properties.value</code> <br /> <code>properties.revenue</code></td>
          <td><code>user_attributes.value</code></td>
          <td>User attribute value. Sent as a separate field from the conversion amount, though the same property can populate both.</td>
      </tr>
      <tr>
          <td><code>properties.predictedLtv</code> <br /> <code>properties.predicted_ltv</code></td>
          <td><code>user_attributes.predictedltv</code></td>
          <td>Predicted lifetime value.</td>
      </tr>
      <tr>
          <td><code>context.userAgent</code> <br /> <code>context.user_agent</code></td>
          <td><code>device_info.http_header_user_agent</code></td>
          <td>HTTP user agent.</td>
      </tr>
      <tr>
          <td><code>context.traits.iosAdvertisingId</code> <br /> <code>context.traits.ios_advertising_id</code> <br /> <code>traits.iosAdvertisingId</code> <br /> <code>traits.ios_advertising_id</code></td>
          <td><code>device_info.ios_advertising_id</code></td>
          <td>iOS advertising ID, unless overridden by <code>context.device.advertisingId</code> on an Apple device.</td>
      </tr>
      <tr>
          <td><code>context.traits.androidAdvertisingId</code> <br /> <code>context.traits.android_advertising_id</code> <br /> <code>traits.androidAdvertisingId</code> <br /> <code>traits.android_advertising_id</code></td>
          <td><code>device_info.android_advertising_id</code></td>
          <td>Android advertising ID, unless overridden by <code>context.device.advertisingId</code> on an Android device.</td>
      </tr>
      <tr>
          <td><code>properties.orderId</code> <br /> <code>properties.order_id</code> <br /> <code>properties.confirmationRef</code> <br /> <code>properties.confirmation_ref</code></td>
          <td><code>events[].data.custom_attributes.confirmationref</code></td>
          <td>Order or confirmation reference.</td>
      </tr>
      <tr>
          <td><code>properties.amount</code> <br /> <code>properties.revenue</code> <br /> <code>properties.total</code> <br /> <code>properties.value</code> <br /> <code>properties.price</code></td>
          <td><code>events[].data.custom_attributes.amount</code></td>
          <td>Conversion amount, converted to a string.</td>
      </tr>
      <tr>
          <td><code>properties.currency</code></td>
          <td><code>events[].data.custom_attributes.currency</code></td>
          <td>Conversion currency.</td>
      </tr>
      <tr>
          <td><code>context.page.path</code> <br /> <code>properties.name</code> <br /> <code>name</code></td>
          <td><code>events[].data.custom_attributes.screen_name</code></td>
          <td>Page path or event name.</td>
      </tr>
      <tr>
          <td><code>context.page.url</code> <br /> <code>properties.url</code></td>
          <td><code>events[].data.custom_attributes.url</code></td>
          <td>Page URL.</td>
      </tr>
      <tr>
          <td><code>context.ip</code> <br /> <code>context.request_ip</code> <br /> <code>request_ip</code></td>
          <td><code>ip</code></td>
          <td>IP address at the batch root.</td>
      </tr>
      <tr>
          <td><code>properties.roktClickId</code> <br /> <code>properties.rokt_click_id</code> <br /> <code>properties.rclid</code> <br /> <code>properties.rtid</code> <br /> <code>context.page.search</code></td>
          <td><code>user_identities.other2</code> <br /> <code>integration_attributes[&quot;1277&quot;].passbackconversiontrackingid</code></td>
          <td>Rokt click ID. If no click ID property is populated, RudderStack reads <code>rclid</code>, then <code>rtid</code>, from <code>context.page.search</code>.</td>
      </tr>
      <tr>
          <td><code>timestamp</code> <br /> <code>originalTimestamp</code> <br /> <code>sentAt</code></td>
          <td><code>events[].data.timestamp_unixtime_ms</code></td>
          <td>RudderStack selects the first populated timestamp, validates it, then converts it to Unix milliseconds. If that value is invalid, the outgoing timestamp is omitted; RudderStack does not try later properties.</td>
      </tr>
      <tr>
          <td><code>context.device.type</code> <br /> <code>context.device.advertisingId</code></td>
          <td><code>device_info.ios_advertising_id</code> <br /> <code>device_info.android_advertising_id</code></td>
          <td>The device type determines where the advertising ID is placed: iOS for Apple devices or Android for Android devices. Unsupported device types do not place this ID.</td>
      </tr>
  </tbody>
</table>

<html lang="en">
<blockquote class="info">
  <div class="tip-quote">
    
    <div class="tip-text">The SHA-256 trait variants let you send pre-hashed PII instead of plaintext values.</div>
  </div>
</blockquote>

</html>

