Inserting a code to your web

It is almost as easy as setting up a Google Analytics code.

  1. Sign up or sign in to Product Fruits editor.
  2. Create a new project. Give it a name and a base URL. A base URL is a root page of your web application (for instance, https://my-super-app.com or https://some-hosting.com/my-super-app).
  3. Copy the code from the project dashboard and insert it to your web application right before the closing body tag (</body>).
  4. Adjust user parameters (see the next section).

Identifying users

We need to indetify individual users to show tours or announcements properly at the right time. Replace parameters (between << and >>) with correct values.

The most important field (and the only required field) is username. This field must be unique for each user.

Custom properties

You can send custom properties to Product Fruits. They can be useful for Rules definition. Send them as props:

window.productFruitsUser = { username: '<<REPLACE>>',
                             props: {
                                 yourCustomProp: 'value',
                                 yourCustomProp2: 'value2'
                             }
                           };

User data security & GDPR

If you don't need target users by their usernames or e-mails, we recommend to hash (MD5 or similar) these values provided to Product Fruits to avoid GDPR issues.