US location installation instructions

This article contains legacy installation scripts. We're working on the article update.

To install Product Fruits into your application, when your company uses our US location, follow the standard installation guide. However, there are things you need to update

You have to set the productFruitsEnv global variable to us1 and the standard domain to

Standard JavaScript snippet changes

<script type="text/javascript">
	window.productFruitsEnv = 'us1';
	window.productFruitsUser = { username: '<<REPLACE>>' };
        var a=d.getElementsByTagName('head')[0];
        var r=d.createElement('script');r.async=1;
	})(window,document,'','xxxxxxxxx','HERE COMES THE LANGUAGE CODE'); // language = ISO 2 letter

React or NextJS changes

The change is quite simple. Add the environment prop and set it to us1.

<ProductFruits projectCode='xxx' language='en' {...userInfo} environment='us1' />