This guide will explain how you can integrate Amplitude to send data to Attribution.

In order for Attribution to work with Amplitude data you need to provide pageview information which is not standertized in Amplitude protocol so you need to fire custom event in Amplitude which will translate into Attribution as a pageview later. Simply add next code after Amplitude SDK initialization:

amplitude.getInstance().logEvent('Loaded a Page', {
  url: window.location.href,
  referrer: document.referrer
});

The code above must be triggered on every page load, or at least on every landing page. We usually recommend to install it globally on your marketing websites. This will allow Amplitude to collect the data necessary to build your model in Attribution.

To import data from Amplitude into Attribution, you have to do the following steps:

  1. Create S3 bucket

  2. Set up data export from Amplitude: https://help.amplitude.com/hc/en-us/articles/360044561111-Integrate-Amplitude-with-Amazon-S3

  3. Give Attribution access to S3 bucket

    1. Go to your bucket at AWS console: https://s3.console.aws.amazon.com/s3/buckets
    2. Go to Permissions tab for the bucket.
    3. Click Edit under Bucket policy.
    4. Add next statement:
    {
      "Sid": "Stmt1441164338000",
      "Effect": "Allow",
      "Action": [
        "s3:*"
      ],
      "Resource": [
        "arn:aws:s3:::bucketName",
        "arn:aws:s3:::bucketName/*"
      ],
      "Principal": {
        "AWS": [
          "arn:aws:iam::348454833122:root"
        ]
      }
    },
    

    Replace bucketName to actual name of your bucket.
    5. If you did Amplitude setup previously you should already have policy with one statement, Attribution statement must be added in addition to existing Amplitude statement inside "Statement: []" section.
    6. Click Save.

2249
  1. Let us know the the name of your export bucket and we will do the setup on our side.