Skip to main content

Player - Add AnyClip Embed Code to Your WordPress Site (Using: Google Tag Manager)

Updated this week

You can integrate the AnyClip player into your WordPress website using Google Tag Manager. Follow the steps below to configure the player embed via GTM in WordPress.

๐Ÿ“ Prerequisite

  • Obtain the Player JS-embed code from AnyClip.


Part 1: Set Up Google Tag Manager on WordPress

  1. Select the appropriate account/domain under the Google Tags tab.

  2. Click Installation Instructions.

  3. Click Select your platform.

  4. Choose WordPress.

  5. Follow the instructions provided to install GTM on your WordPress site.


Part 2: Add the AnyClip Player as a Custom Tag

Once Google Tag Manager is installed:

1. Create a New Tag

  • In GTM, go to Tags and click New.

2. Name the Tag

  • Set a tag name, e.g., AnyClip Video Player, and click Edit.

3. Choose Tag Type

  • Select Custom HTML as the tag type.

4. Paste the Player Embed Code

In the HTML field, paste your customized code (Remmeber to replace pubname and widgetname values):

<script>
(function() {
var script = document.createElement('script');
script.src = 'https://player.anyclip.com/anyclip-widget/lre-widget/prod/v1/src/lre.js';
script.setAttribute('pubname', '360dailycom'); // Replace with your pubname
script.setAttribute('widgetname', '0011r00001kaHto_131'); // Replace with your widgetname
document.getElementsByTagName('head')[0].appendChild(script);
})()
</script>

5. Set the Trigger

  • Under Triggering, select the trigger type All Pages to load the player on every page.

6. Save the Tag

  • Click Save.


7. Publish the Changes

  • In the Overview section, confirm the tag is listed under Workspace Changes.

  • Click Submit.

  • Click Publish.

๐Ÿ•’ Note: It may take a few minutes for the new tag to propagate across your site.


8. Verify the Player is Loaded

  • Open Chrome DevTools (Right-click > Inspect > Network tab).

  • Confirm lre.js is loaded on all pages.


9. Add Player Placeholder to Your Siteโ€™s Articles

To designate where the player will appear, add the following HTML snippet to your page templates or article content:

<div id="ac-lre-player"></div> 


โš ๏ธ Disclaimer

This guide involves using Google Tag Manager, a third-party tool.
AnyClip is not affiliated with Google Tag Manager, and we do not assume responsibility for its setup, functionality, or integration issues.
Ensure you have access to your GTM account and the required permissions before proceeding.

Did this answer your question?