Setting up an authorization to Magento Advanced Reporting#

This guide explains how to set up the authorization to Magento Advanced Reporting.

Prerequisites#

Before you read this reference, perform all of the following actions:

Retrieving Analytics access token from Magento Advanced Reporting#

To retrieve an access token, follow these steps:

  1. Log in to the Magento Advanced Reporting admin page. For more information, see the Magento Advanced Reporting documentation.

  2. In the secondary menu, click System.

  3. Under Extensions, click Integration.

  4. Edit the API Connection to view the access token. For more information, see the Magento Advanced Reporting documention.

  5. Copy the Access Token.

    Note

    Admin tokens are valid for 4 hours and customer tokens are valid for 1 hour. For more information on how to extend the validity period of the token, see the Magento Advanced Reporting documentation.

To retrieve an Analytics access token, follow these steps:

  1. Log in to the server that hosts Magento Advanced Reporting. An example of a server URL is as follows:

    https://devdocs.magento.com/cloud/env/environments-ssh.html#magento-cli
    
  2. Enter the following into the command line, and run the command to display the Analytics access token:

    web@mymagento.0:~$ ./bin/magento config:show | grep analytics/general/token
    
  3. Copy the Analytics access token from the command line.

Setting up an authorization to Magento Advanced Reporting#

To set up an authorization to Magento Advanced Reporting, follow these steps:

  1. Go to the Datastreams page.

  2. In the top right corner, click + Create datastream.

  3. Search for and click Magento Advanced Reporting.

  4. Click Setup a new Authorization.

  5. In Website URL, enter the URL for the Magento Advanced Reporting API.

  6. In Access token, enter the access token retrieved from your Magento Advanced Reporting admin account.

  7. In Analytics access token, enter the Analytics access token retrieved from the command line.

  8. Click Authorize.