Using External Code

Want a video walkthrough? Check out this video from our client success team.

 

Summary

Customize the look, feel, and function of your Content Tracks using custom code. These are snippets of HTML or Javascript code that you can insert into your content tracks.

The process of using external code in your Content Tracks is as follows:

  1. Add your custom code to the External Code Library.

  2. Use on any Target, Recommend, or Explore Content Track by selecting the code snippets in the Track Settings.

Note
You are able to add multiple pieces of code to a single Content Track.

  1. Click on the gear icon at the top right of the page, and select External Code from the drop-down menu.
    image


Add External Code

  1. Click Add External Code.
    image

  2. Name your external code and enter the code. Click Add External Code to save it to your external code library.
    image

  3. Select the external code you just added. The configuration window will open on the right.
    image

  4. Click External Code Name to change the name of the code. Click Save.
    image

  5. Click Language Descriptions to add and edit descriptions of the code. These descriptions will be visible to your visitors if the external code requires cookie consent. You are able to add descriptions in multiple languages; the description displayed is dependent on the language selected for the content track.

    Note
    Read this FAQ for more information on PathFactory’s Cookie Consent feature.

    image

  6. Click the Code Snippet box to edit the external code. After making changes click Save Code.
    image

  7. Click Location to change the location of the external code. Click Apply to save.

    Warning
    If you are using external code in conjunction with an external tag manager the location of the external code can impact the manager’s performance.
    For example, Google Tag Manager requires the external code to be as close to the top of the body as possible, so you would select Top Body Tag.

    image

  8. If you want the code to be globally enabled click the toggle to switch it to On.

    Note
    If external code is globally enabled it will be enacted on every content asset in a content track.

    image

  9. If you want the code to show only when a visitor has opted in to cookie tracking (by clicking Accept in Cookie Consent modal), click the toggle to switch it to On.

    Note
    If you are building GDPR compliant content tracks you will need to get visitor consent for any external code that tracks visitors. Read these FAQs for more information on Cookie Consent and GDPR compliance.

    image


Add External Code to Content Tracks

You are able to add your External Code to any Target, Recommend, or Explore Content Track when configuring the track’s Track Settings.
image

  • Click here for more information on adding External Code to Target or Recommend Content Tracks.

  • Click here for more information on adding External Code to Explore Pages.


Delete External Code

  1. Select the external code you want to delete. The configuration window will appear on the right.
    image

  2. Click on the trash bin icon to delete.
    image

Updated on June 29, 2022

Was this article helpful?

Need Support?
Can't find the answer you're looking for? Don't worry we're here to help!
CONTACT SUPPORT