# Rakuten

> The article provides an overview of the integration between Rakuten and AnyTrack, highlighting its ability to simplifies conversion tracking for affiliate marketing.

## Rakuten Integration Overview

Rakuten and AnyTrack are joining forces to bring you the ultimate conversion tracking experience. With Rakuten, you can easily access valuable data from your affiliate network that shows which campaigns are performing best - all in one place. And with AnyTrack's powerful integration technology, this data is automatically sent to Google Ads, Facebook `Conversion API` and TikTok API for further analysis.

<Prerequisites
  title="Before you begin"
  items={[
    { label: "You have an AnyTrack account with a paid subscription", done: true },
    { label: "You have an active Rakuten affiliate account", done: true },
    { label: "The AnyTrack Tracking Tag is installed on your website", done: true },
  ]}
/>

### How does the Rakuten AnyTrack integration work:

1. **Traffic**: When visitors land on your website, AnyTrack collects traffic source data and First Party data.
2. **Engagements**: When visitors click on your Rakuten affiliate links, AnyTrack does a few things:
   1. Collects granular data tied to the `OutboundClick`.
   2. Triggers Event Tracking API requests to your Tracking Tags and analytics.
3. **Conversions:** When visitors convert on the merchant's website, AnyTrack receives real time conversion data through Postback URL.
4. **Attribution:** AnyTrack processes the conversion data and reports it across various reporting sections of the AnyTrack Dashboard.
5. **`Conversion API`:** AnyTrack then sends your conversions to your **Ad Platforms' `Conversion API`** so you can feed your ad platform's Machine Learning, AI and automatic optimization according to 100% of your conversion data.

### Technical details

| Reference       | Value          | Information                                                                        |
| --------------- | :------------- | :--------------------------------------------------------------------------------- |
| Tracking Group  | `rakuten`      | The Tracking Group reference can be used to activate <Glossary>AutoTag</Glossary>. |
| Subid Parameter | `u1`           | The Subid Parameter used to pass the AnyTrack `click_id`.                          |
| Tracking Method | `Postback URL` | -                                                                                  |

### Standard Conversions

| Event Name      | Details                                          | Data Source     |
| :-------------- | :----------------------------------------------- | :-------------- |
| `OutboundClick` | When a visitor clicks on Rakuten offer links.    | AnyTrack JS Tag |
| `Lead`          | When a free registration is recorded in Rakuten. | Postback URL    |
| `Purchase`      | When a user generates a commission in Rakuten.   | Postback URL    |

### The Rakuten Postback URL

The Postback URL is fully pre-defined and ready to be implemented with your Rakuten account.

```http
https://t1.anytrack.io/hBtoE3hN/collect/rakuten
```

## Configuring Rakuten Integration with AnyTrack Dashboard

This guide provides step-by-step instructions on how to configure Rakuten integration with the AnyTrack dashboard. By following these steps, users can easily set up the integration and add a Global postback URL to fire conversion events for all offers in Rakuten. This guide is essential for anyone looking to simplifies their advertising efforts and track conversions accurately.

### Interactive tutorial

<HTMLBlock html={"\n<iframe src=\"https://scribehow.com/embed/Configuring_Rakuten_Integration_with_AnyTrack_Dashboard__-8iLn7O4QFqvf3AoTc0ZNg?removeLogo=true\" width=\"100%\" height=\"640\" allowfullscreen frameborder=\"0\"></iframe>\n"} />

**1. From the AnyTrack Dashboard, Click on the Integration Catalog**

![AnyTrack Integration Catalog in the dashboard](./ascreenshot-ef1518429c.jpg)

**2. Click on Add Integration**

![Add Integration button in AnyTrack](./ascreenshot-c6444e5088.jpg)

**3. Search for the Rakuten Integration**

![Search result for the Rakuten integration](./ascreenshot-72c1198df9.jpg)

**4. Click on the Rakuten Card**

![Rakuten integration card in AnyTrack](./ascreenshot-d533452f20.jpg)

**5. Now click on Install Integration to access the detailed instructions.**

![Install Integration button for Rakuten](./user-cropped-screenshot-b83ad9c330.jpg)

**6. Add your Rakuten Account Credentials**

![Rakuten account credentials fields in AnyTrack](./ascreenshot-95eeaa4f08.jpg)

**7. Access your Rakuten Publisher Account and copy the Publisher ID**

![Rakuten Publisher ID in the publisher account](./user-cropped-screenshot-9d2aa19d75.jpg)

**8. Return to AnyTrack and Paste your Publisher ID.**

**9. Now "Go to Developers Portal" To get your API Credentials.**

> 🚧 **Note**
>
> If you don't have a Developer Account you will have to create one. It's a simple process which is automatically approved.

**10. Now Click on "Add Application".**

**11. Name it AnyTrack and Click Create.**

**12. Copy the Client ID**

**13. Return to AnyTrack and Paste the Client ID.**

**14. Return to Rakuten Developer Portal and Copy the Client Secret.**

**15. Return to AnyTrack and Paste the Client Secret.**

![Rakuten Client Secret field in AnyTrack](./user-cropped-screenshot-6a3c2cc876.jpg)

**16. Now Click Connect!**

AnyTrack will send an API call to Rakuten which will add and activate your Postback URL in your account.

**17. Finally Save your account settings.**

> 📘 **Note**
>
> The Integration will remain "inactive" until a conversion is sent from Rakuten to AnyTrack.

**18. Check the Event Log Tab to see your conversions coming through.**

![AnyTrack Event Log tab with Rakuten conversions](./ascreenshot-0c65e8f8c2.jpg)

**19. Here you can see a conversion Payload From Rakuten.**

![Rakuten conversion payload in AnyTrack](./ascreenshot-a34a43dc5a.jpg)

> 📘 **Note**
>
> All conversion parameters are mapped to AnyTrack <a href='/docs/event-attributes'>Event Attributes</a>. They will be automatically forwarded to your Ad Platforms' `Conversion API` to enrich your audience data.

***

## Validate your integration

This section will enable you to validate the main aspects of your setup.

<Callout icon='🔎' theme='default'>
  <p><strong>Install the AnyTrack Pixel Helper Extension</strong></p>
  <p>Install the <a href='https://chromewebstore.google.com/detail/anytrack-pixel-helper/ojmhkmdpagjeopleoeihbhgejcfoijjn'>AnyTrack Pixel Helper</a> Chrome extension to verify the AnyTrack Tag is installed on your website. It also shows connected ad platforms and browser-side events. <a href='/docs/anytrack-chrome-extension'>Learn more</a>.</p>
</Callout>

### Link tracking

Since tracking starts when visitors click on offer links, verify that your links are tracked and AutoTagged.

### AutoTag Methods

<Callout icon='🔥' theme='default'>
  <p><strong>Reminder about AutoTag:</strong></p>
  <p><strong>AutoTag</strong> is a function that is enabled by default through the AnyTrack Tracking Tag, and that appends <code>u1</code> &amp; <code>click_id</code> data to affiliate links. Learn <a href='/docs/autotag'>more about AutoTag</a>.</p>
</Callout>

* **Default**: By default, AnyTrack automatically identifies and AutoTags Rakuten links found on your website.

```html
<!DOCTYPE html>
<html>
<body>

<h4>Rakuten regular offer link</h4>
<p><a href="https://click.linksynergy.com/fs-bin/click?id=3EXBwEUh9KI&offerid=311675.10000157&bids=311675.10000157&type=3&subid=0">Technology Used by Successful Businesses</a>
<img border="0" width="1" height="1" alt="" src="https://ad.linksynergy.com/fs-bin/show?id=3EXBwEUh9KI&offerid=311675.10000157&bids=311675.10000157&type=3&subid=0" /></p>
  
<h4>Rakuten Deep link</h4>
<p><a href="https://click.linksynergy.com/deeplink?id=7VeMhFdLOPg&mid=36310&murl=https://www.dyson.com/vacuum-cleaners/cordless/v8/silver-nickel" data-tracking-group="rakuten">With Data Tracking Group</a>
</p>
<p><a href="https://click.linksynergy.com/deeplink?id=7VeMhFdLOPg&mid=36310&murl=https://www.dyson.com/vacuum-cleaners/cordless/v8/silver-nickel">Without Data Tracking Group</a>
</p>
  </body>
</html>
```

Now the real link embedded in the page:

<HTMLBlock html={"\n<!DOCTYPE html>\n<html>\n<body>\n\n<h4>Rakuten regular offer link</h4>\n<p><a href=\"https://click.linksynergy.com/fs-bin/click?id=3EXBwEUh9KI&offerid=311675.10000157&bids=311675.10000157&type=3&subid=0\">Technology Used by Successful Businesses</a>\n<img border=\"0\" width=\"1\" height=\"1\" alt=\"\" src=\"https://ad.linksynergy.com/fs-bin/show?id=3EXBwEUh9KI&offerid=311675.10000157&bids=311675.10000157&type=3&subid=0\" /></p>\n  \n<h4>Rakuten Deep link</h4>\n<p><a href=\"https://click.linksynergy.com/deeplink?id=7VeMhFdLOPg&mid=36310&murl=https://www.dyson.com/vacuum-cleaners/cordless/v8/silver-nickel\" data-tracking-group=\"rakuten\">With Data Tracking Group</a>\n</p>\n<p><a href=\"https://click.linksynergy.com/deeplink?id=7VeMhFdLOPg&mid=36310&murl=https://www.dyson.com/vacuum-cleaners/cordless/v8/silver-nickel\">Without Data Tracking Group</a>\n</p>\n  </body>\n</html>\n"} />

* **AutoScan**: AnyTrack scans links that are embedded in redirects plugins and AutoTags them accordingly.
* **Manual**:
  * **Tracking Group Attribute**: You add the tracking group attribute to links according to their tracking requirements. For example: `data-tracking-group="rakuten"` or `rel="rakuten"`. More about <a href='/docs/tgid'>Tracking Group</a>.
  * **Click ID Token:** Manually append the `u1` parameter: `&u1=--CLICK-ID--` to the offer link.

Once the links are set up, you can check in your Rakuten account reports and see whether the `u1` parameters are passed to the offer links.

**Here is an example of how you would manually update links from `rakuten`:**

```html
<a href="https://example.foo/goto/rakuten" data-tracking-group="rakuten">Hover on the Rakuten Demo Link to see the AnyTrack click_id</a>
```

<HTMLBlock html={"\n<a href=\"https://example.foo/goto/rakuten\" data-tracking-group=\"rakuten\">Hover on the Rakuten Demo Link to see the AnyTrack click_id</a>\n"} />

> 📘 **Tracking Group**
>
> Tracking Group refers to the integration technology. For Rakuten, the <Glossary>Tracking Group</Glossary> value is `rakuten`.

### Conversion Tracking

To validate your setup, wait for a conversion or trigger a test conversion yourself and inspect the conversion logs.

**Rakuten Postback Data Example**

```json
{
  "transaction_date": "2023-05-21T06:58:45.000+0000",
  "sku_number": "TRCAT5DB",
  "quantity": "1",
  "etransaction_id": "B7B2BE0B83ECDD168FD50BC789F508AC",
  "transaction_type": "realtime",
  "product_name": "TRCAT5DB",
  "offer_id": "1262960",
  "advertiser_id": "45904",
  "sid": "3771737",
  "is_event": "Y",
  "commissions": "25",
  "process_date": "2023-05-21T06:58:45.000+0000",
  "currency": "EUR",
  "u1": "Zojr5qPF3fVk9OckC3bBS8H4tHkcn7pGuE",
  "order_id": "4000110733",
  "sale_amount": "43.17"
}
```

***

## Related Resources

- [TikTok Ads](/docs/tiktok-ads)
- [Install AnyTrack Tag](/docs/install-anytrack-tag)
- [Integration Event Log](/docs/integration-event-log)

<FaqAccordion
  title="FAQ and Troubleshooting"
  icon="fa-question"
  items={[
    {
      question: "Can I import past conversions into AnyTrack?",
      answer: "No. AnyTrack can only ingest conversions that have been triggered following a visitor session on your website."
    },
    {
      question: "Can I track direct linking campaigns?",
      answer: "Yes, but this requires a custom setup. Refer to the direct link tracking article in the AnyTrack Knowledge Base for details."
    },
    {
      question: "Can I use a different subid parameter than the one predefined by AnyTrack?",
      answer: "No."
    },
    {
      question: "Can I track conversions without the click_id?",
      answer: "No. The click_id passed to the Rakuten links is required to track conversions."
    },
    {
      question: "The Conversion Event Name is not what I am expecting. How can I change it?",
      answer: "You can update the Event Mapping in the Integration page."
    }
  ]}
/>

> 📘 **Direct link tracking**
>
> To track direct linking campaigns (ads → Rakuten link → merchant), follow the <a href='/docs/deeplink'>direct link tracking setup guide</a>.
