Using Acquia Lift with testing environments

No one intends to make a mistake.

Because of this truism, as a best practice, we encourage you to test changes to your website in either a staging environment or a local environment (for example, Acquia Dev Desktop) before you commit your changes to your production website. This includes the initial development and ongoing changes you make to your website's Acquia Lift settings and configuration.

To ensure that Acquia Lift reflects your changes in your testing environments, you must keep the Acquia Lift-related modules enabled on your test site. However, if your testing and production environments both point to the same Acquia Lift account, they could interfere with one another. Visitor interactions that take place during testing may "pollute" the data that's collected for targeting and testing the content in your production environment.

Per-environment configuration settings

Unless you specifically take action, data collected by testing environments can contaminate data collected on your production environment.

To avoid this issue, download this code and add it to your website's settings.php file. Modify the provided code to set the variables associated with Acquia Lift and its components (including $config['acquia_lift.settings'] and $config['acquia_contenthub.admin_settings']) for different values depending on the environment in which they exist.

Using a separate Acquia Lift account for testing

To prevent your testing and production environments from conflicting with each other, you need to associate your testing environment with a different Acquia Lift account. To do this, complete the following steps:

  1. Obtain a second set of Acquia Lift keys from your Acquia account manager.
  2. When configuring Drupal, ensure that you use a different Site ID than your production website's value. See the following resources for information about how to obtain this value, by Drupal version: Drupal 7 or Drupal 8.
  3. In your testing environment, edit the website's settings.php file.
  4. Add the following code to the settings.php file:

    $conf['acquia_lift_account_info'] = array(
      'owner_code' => 'owner-123',
      'api_url' => 'api-us1.lift.acquia.com',
      'api_key' => 'api-123',
      'admin_key' => 'admin-123'
    );

    replacing the following values with your second set of Acquia Lift keys:

    • owner-123
    • api-us1.lift.acquia.com
    • api-123
    • admin-123
  5. Save the settings.php file.

You can now safely develop and test on your testing website, without affecting the data that's used by Acquia Lift to display appropriate content to your production website's visitors.

Contact supportStill need assistance? Contact Acquia Support