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.
    imageExternal Code menu item

Add External Code

  1. Click Add External Code.
    imageAdd External Code button
  2. Name your external code and enter the code. Click Add External Code to save it to your external code library.
    imageAdd External Code button
  3. Select the external code you just added. The configuration window will open on the right.
    imageConfiguration window
  4. Click External Code Name to change the name of the code. Click Save.
    imageExternal Code Name field
  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.

    imageConfigure Language Descriptions menu

  6. Click the Code Snippet box to edit the external code. After making changes click Save Code.
    imageCode Snippet example
  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.

    imageApply button

  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.

    imageEnable Globally toggle

  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.

    imageEnable 3rd Party Cookie toggle


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.
imageExternal Code

  • 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.
    imageExternal Code Name
  2. Click on the trash bin icon to delete.
    imageTrash bin icon
Updated on July 24, 2023

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