Add the AptEdge snippet to your site

  1. Navigate to your Salesforce site and open the Experience Builder.

<aside> ⚠️

You’ll need to log in as an administrator or user with edit permissions.

</aside>

  1. Click the Settings icon (⚙️) in the toolbar.

    image.png

  2. In the Settings panel, select Advanced.

    image.png

  3. Under Head Markup, choose Edit Head Markup.

  4. Add the AptEdge snippet that you copied within <script> tags, then click Save to apply the changes. For example:

<script>
	// Add your snippet here
</script>

Configure your Content Security Policy (CSP)

For the snippet to load properly, you may need to adjust your site’s Content Security Policies:

  1. In the Settings panel, select Security & Privacy.

  2. Under Content Security Policy (CSP), change your Security Level to Relaxed CSP.

    image.png

  3. Once the site reloads, you may see a Can’t Access Resources error. Choose OK.

    image.png

  4. Add AptEdge as a trusted site:

    1. In the Settings panel, under CSP Errors, choose Allow URL next to the Blocked Resource, then choose Allow.

      image.png

    2. Alternatively, manually add the trusted site:

      1. Name: AptEdge
      2. URL: https://storage.googleapis.com/aptedge-self-service-customers/css/aptedge.js
      3. Select the Active checkbox

Test and publish your site

  1. Once you’ve added the JavaScript snippet and added AptEdge as a trusted site, choose Preview on the top right of the Experience Builder.

  2. You should see AptEdge appear in the bottom right corner of your site. Feel free to test it out!

    image.png

  3. Choose Back to Builder, then choose Publish to save your changes.