|
| 1 | +--- |
| 2 | +title: Moloco Commerce Media Destination |
| 3 | +beta: true |
| 4 | +id: |
| 5 | +--- |
| 6 | + |
| 7 | +[Moloco Commerce Media](https://www.moloco.com/products/moloco-retail-media-platform) (MCM) is a technology solution that empowers marketplaces and online retailers to build and scale a retail media business (i.e., sponsored ads). Moloco’s solution helps platforms leverage and activate their first-party data to deliver highly relevant and performant ads, automate ad decision-making, and scale their ads business. |
| 8 | + |
| 9 | +This Moloco Commerce Media destination can send user events collected using the Segment SDK to Moloco’s platform for simplified performance ads integration. |
| 10 | + |
| 11 | +This allows you to run performance advertising without having to build your own backend system to ingest and send user events data in realtime to Moloco. |
| 12 | + |
| 13 | +## Getting Started |
| 14 | + |
| 15 | +Before you configure the Moloco Commerce Media destination, make sure that your source data is configured correctly and that you are able to see events flowing in the event stream debugger. |
| 16 | + |
| 17 | +To configure the Moloco Commerce Media destination, you need to get the following 2 elements from your Moloco representative. |
| 18 | + |
| 19 | +1. Moloco Platform ID |
| 20 | +2. Moloco Event Service API key |
| 21 | + |
| 22 | +Once you obtain those 2 pieces of information, you can move on to the Segment console. |
| 23 | + |
| 24 | +1. From the Segment web console, click Catalog. |
| 25 | +2. On the Catalog page, from the destination tab, Search for “Moloco”, select it, and click on Add destination. |
| 26 | +3. Choose which of your sources to connect the destination to. |
| 27 | +4. In the Moloco MCM destination settings page, fill the Platform ID and API key fields with the previously collected information and select “APP or SITE” depending on your source endpoint (mobile or website). |
| 28 | + |
| 29 | +## Identify |
| 30 | + |
| 31 | +We strongly recommend that you identify your logged-in users using the [Identify method provided by Segment](https://segment.com/docs/connections/spec/identify/). We also recommended hashing the user ID before sending. |
| 32 | + |
| 33 | +Please find below an example call to identify: |
| 34 | + |
| 35 | +```js |
| 36 | +analytics.identify('361b1fdfbeaa9d64a13c033eb9f970dc6740f6bc', { |
| 37 | + |
| 38 | +}); |
| 39 | +``` |
| 40 | + |
| 41 | +Once a user is identified, each call to the [Track method](https://segment.com/docs/connections/spec/track/) will automatically record the user ID. |
| 42 | +For non logged-in users, you can still track them using an [anonymous ID](https://segment.com/docs/connections/spec/identify/#anonymous-id) (something like UUID as recommended by Segment) but on the Moloco Commerce Media side, we do not use that field for non logged-in users. |
| 43 | + |
| 44 | +_Note_: if you decided to hash the user ID before sending it to Moloco for event tracking, please make sure you reuse the same hashed ID when calling other Moloco’s APIs like Decision API. |
| 45 | + |
| 46 | +## Moloco Commerce Media’s available presets |
| 47 | + |
| 48 | +MCM currently supports the following [user event data specifications](https://mcm-docs.moloco.com/docs/51-user-event-data-specifications). |
| 49 | + |
| 50 | +<table> |
| 51 | + <tr> |
| 52 | + <td>**Event type**</td> |
| 53 | + <td>**Trigger**</td> |
| 54 | + <td>**Description**</td> |
| 55 | + </tr> |
| 56 | + <tr> |
| 57 | + <td>HOME</td> |
| 58 | + <td>Event type = "page" AND event = "Home"</td> |
| 59 | + <td>HOME event type is when a shopper views your website's main or home page.</td> |
| 60 | + </tr> |
| 61 | + <tr> |
| 62 | + <td>LAND</td> |
| 63 | + <td>Event type = "page" AND event = "Land"</td> |
| 64 | + <td>LAND event type is when a shopper is visiting your website from an external source (ex. Google Shopping)</td> |
| 65 | + </tr> |
| 66 | + <tr> |
| 67 | + <td>ITEM_PAGE_VIEW</td> |
| 68 | + <td>Event type = "track" AND event = "Product Viewed"</td> |
| 69 | + <td>ITEM_PAGE_VIEW event type is when a shopper visits a product detail page.</td> |
| 70 | + </tr> |
| 71 | + <tr> |
| 72 | + <td>ADD_TO_CART</td> |
| 73 | + <td>Event type = "track" AND event = "Product Added"</td> |
| 74 | + <td>ADD_TO_CART event type is when a shopper adds an item to the cart.</td> |
| 75 | + </tr> |
| 76 | + <tr> |
| 77 | + <td>ADD_TO_WISHLIST</td> |
| 78 | + <td>Event type = "track" AND event = "Product Added to Wishlist"</td> |
| 79 | + <td>ADD_TO_WISHLIST event type is when a shopper puts an item into the wish list.</td> |
| 80 | + </tr> |
| 81 | + <tr> |
| 82 | + <td>SEARCH</td> |
| 83 | + <td>Event type = "track" AND event = "Product Searched"</td> |
| 84 | + <td>SEARCH event type is when a shopper searches items with keywords or phrases from your site.</td> |
| 85 | + </tr> |
| 86 | + <tr> |
| 87 | + <td>PAGE_VIEW</td> |
| 88 | + <td>Event type = "page" AND event != "Home"</td> |
| 89 | + <td>PAGE_VIEW event type is when a shopper visits a page other than the product detail pages or the homepage of your site.</td> |
| 90 | + </tr> |
| 91 | + <tr> |
| 92 | + <td>PURCHASE</td> |
| 93 | + <td>Event type = "track" AND event = "Order Completed"</td> |
| 94 | + <td>PURCHASE event type is when a shopper purchases a product.</td> |
| 95 | + </tr> |
| 96 | +</table> |
| 97 | + |
| 98 | +## Track |
| 99 | + |
| 100 | +If you’re not familiar with the Segment Specs, take a look to understand what the [Track method](https://segment.com/docs/connections/spec/track/) does. The mappings in the Moloco Commerce Media destination are pre-built based on the [Segment’s Ecommerce Events](https://segment.com/docs/connections/spec/ecommerce/v2/). |
| 101 | + |
| 102 | +Please find below an example call to track a product detail page (PDP) view event: |
| 103 | + |
| 104 | +```js |
| 105 | +analytics.track("Product Viewed", { |
| 106 | + product_id: "1193", |
| 107 | + name: "Newage Uplift Eye Care Cream", |
| 108 | + price: 19.99 |
| 109 | + currency: "USD" |
| 110 | + quantity: 1, |
| 111 | + image_url: "https://www.example.com/iamge.png" |
| 112 | +}); |
| 113 | +``` |
| 114 | + |
| 115 | +## Page |
| 116 | + |
| 117 | +If you’re not familiar with the Segment Specs, take a look to understand what the [Page method](https://segment.com/docs/connections/spec/page/) does. |
| 118 | + |
| 119 | +Please find below an example call to page: |
| 120 | + |
| 121 | +```js |
| 122 | +analytics.page(); |
| 123 | +``` |
| 124 | + |
| 125 | +If you are using the Segment’s Web SDK, this call will automatically collect the page information. Here’s an example of page info automatically collected using the Segment’s Web SDK. |
| 126 | + |
| 127 | +```js |
| 128 | + "page": { |
| 129 | + "path": "/account", |
| 130 | + "referrer": "", |
| 131 | + "search": "", |
| 132 | + "title": "Your Account", |
| 133 | + "url": "https://www.example.com/account" |
| 134 | + }, |
| 135 | +``` |
| 136 | + |
| 137 | +However for iOS and Android, it won’t collect page information. |
| 138 | + |
| 139 | +In Moloco Commercial Media, the [page_id](https://mcm-docs.moloco.com/docs/51-user-event-data-specifications#page_view-event-type) attribute is required for the PAGE_VIEW event. Using the Web SDK, the page_id can be associated with the path attribute. However for iOS/Android, as we do not have an appropriate field for page_id, we recommend using the **Page Identifier Token** field. |
| 140 | + |
| 141 | +This field accepts key:value pairs of strings that can identify the page. |
| 142 | +Stringification Logic is: {key}:{value}s concatenated by ";" |
| 143 | + |
| 144 | +As page_id has a higher priority, **Page Identifier Token** will be ignored if page_id is passed |
| 145 | + |
| 146 | +Here’s an example of Page Identifier Token that could be tracked in a mobile app: |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | +_Note_: if you decided to use the **Page Identifier Token** in your mobile app, please make sure you reuse the same **Page Identifier Token** in place of page_id when calling other Moloco’s APIs like Decision API. |
| 151 | + |
| 152 | +## Mappings |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | +In the mappings, some fields are chosen by default if some common fields map to Moloco Event’s fields. If the mapped key does not exist in the input data, it won’t trigger an error and will just not pass any value. |
| 157 | + |
| 158 | +If you are using **the default fields in a custom way**, please confirm that your mapping meets Moloco's requirements. |
| 159 | + |
| 160 | +Default Mappings are not hard rules. They can be modified to your convenience. |
| 161 | + |
| 162 | +## Monitoring |
| 163 | + |
| 164 | +Once the mappings are configured correctly, you can verify the flow of events from your source to Moloco’s destination in the “**Delivery Overview**” tab. |
| 165 | + |
| 166 | + |
0 commit comments