Using CoreMedia Tag
How to add CoreMedia Tag in CAE or Headless Server using Tag Management
What you'll learn
- Using CoreMedia Tag in your website
Prerequisites
- CoreMedia system with CAE and/or Headless Server
- Basic knowledge of CoreMedia Studio and Engagement Studio
- An Engagement Cloud account with access to the Engagement Studio and an Engagement Cloud ID
Time matters
Should I read this?
This how-to describes how to use CoreMedia Tag in the CAE or Headless Server. Currently, CoreMedia Tag provides analytics tags, personalized URL address file loading, and custom HTML/JavaScript code. By using tags, you can make accurate analysis of your visitors, and allows you to create different marketing actions for better retention and client conversion.
Prerequisites
To use the CoreMedia Tag, you need to have an account in the Engagement Cloud. If you don’t have an account, contact CoreMedia to get one.
Configuring CoreMedia Tag
To enable features with the CoreMedia Tag, you need to add a JavaScript tag to your website, which contains your CoreMedia Engagement Cloud ID and the URL to the CoreMedia JavaScript. The JavaScript tag is provided by CoreMedia and contains the necessary code to load the CoreMedia JavaScript. You can choose to write your own JavaScript for the CoreMedia Tag.
Getting your CoreMedia Tag
Log into your CoreMedia Engagement Cloud and open the Scripts list.
Here, you find the script snippet that you need to add to your website. It contains your Engagement Cloud ID and the URL to the JavaScript. Copy the code.
Adding CoreMedia Tags to the CAE
CoreMedia supports Tag management by offering a simple way to add tags to your website as described in Tag Management. With the user interface of CoreMedia Studio, it is easy to dynamically set up tag management systems during runtime.
To do so, open the TagManagement content item in Studio and add the code that you have copied from the Engagement Studio to section "head" of the pages in your website:
<script>
var bysideWebcare_webcare_id = "<your-engagement-cloud-id>";
var bysideWebcare_lang = "<the-locale-of-the-site>";
</script>
<script src="https://bywe2.byside.com/agent/bwc_we2.js" type="text/javascript"></script>
Now for every page of your website, the CoreMedia Tag is enabled.
Adding CoreMedia Tags to the Headless Server
To enable features of the CoreMedia Tag, you need to add the CoreMedia Tag to all pages. The Spark app has a built-in support since release 2310.0.0 (see the Spark App documentation) All you need to do, is to add your Engagement Cloud ID and optionally the URL to your script file to the environment variables. The language will be configured automatically based on the given site.
To enable the CoreMedia Tag in the Spark app, add the following environment variable to the .env
file and add the values from the snippet that you have copied from page Settings of your Engagement Studio.
VITE_BYSIDE_WEBCARE_ID=<your-engagement-cloud-id>
If you’re not using the default script URL https://bywe2.byside.com/agent/bwc_we2.js
, add your custom URL as another environment variable.
VITE_BYSIDE_WEBCARE_SCRIPT_URL=<your-custom-tag-url>