Overview
The Element451 Embed Code is a single piece of code that you add to your institution's website to connect it to Element451.
The Embed Code enables you to track student activity on your site: when students visit, their page views and link clicks appear in their Element451 profiles, allowing you to segment students based on website behavior and create targeted communications.
The Embed Code also delivers Messenger and Bolt Discovery to your site when you activate those features in Element451, so a single installation covers all three. Website tracking runs independently of Messenger, so even if Messenger is disabled or hidden on specific pages, the Embed Code still collects analytics data.
The Embed Code is designed to be compatible with your institution’s cookie consent and privacy policies. You can connect it to your institution's consent manager so that it waits for a visitor's decision before it runs analytics or uses browser storage, and you can deploy it without using browser storage at all. See Consent-Aware Deployment below.
Note: Depending on how your institution's website is managed, implementing the Embed Code may require involvement from your marketing, web team, or information technology department.
What Gets Tracked
With the Embed Code installed and analytics enabled, you'll see the following student activities from your website appear in their Element451 profiles:
Page views - Which pages students visit and how often
Link clicks - Which links students click and where they lead
This data appears in student profiles and can be used for segmentation, automation, and more.
Implementation Options
Every implementation method uses the same piece of code, so start by getting your Embed Code. Then add it to your website using whichever method fits how your site is managed:
Direct placement on each page
Google Tag Manager
Other tag management software
If your institution uses a consent manager, read Installing with a Consent Manager before you place the code - the order in which the code appears on the page matters.
Get Your Embed Code
In Element451, navigate to Engagement > Conversations > Settings
Select Messenger from the left menu
Scroll to the Embed Code field and click the copy icon
Note: The Embed Code lives in your Messenger settings, but it is not only for Messenger - one installation provides website tracking, Messenger, and Bolt Discovery.
1. Direct Page Implementation
To add the Embed Code directly to your website:
Add the code to the
<head>section of each page on your websiteEnsure the code appears on all pages where you want to track activity
2. Google Tag Manager (GTM) Implementation
Step 2: Exclude Element451 Pages from GTM Tag
Step 2: Exclude Element451 Pages from GTM Tag
Since the Embed Code is already present on Element451 Application Sites, Event Sites, Forms, Microsites, and Pages, adding your GTM container to these pages can cause duplicate tracking. To avoid this:
Identify Your Element451 URLs:
List URLs for Pages, Application Sites, and Events (e.g., "events.yourinstitution.edu")
Include any custom domains or subdomains you use for Element451 modules
Create an Exclusion Trigger in GTM:
Select Triggers from the left menu
Click New to create a new trigger
Name your trigger (e.g., "All Pages except Element451")
Select Page View and set the trigger to fire on Some Page Views
Add conditions for each URL in your list:
Page URL does not contain [your Element451 URL]
Create a separate condition for each Element451 domain/subdomain
Save the trigger and apply it to your Embed Code tag
Step 3: Verify Implementation
Step 3: Verify Implementation
Visit your website and check that the Embed Code is firing in GTM Preview mode
Student activities should begin appearing in Element451 profiles
Verify that the Embed Code is NOT firing on Element451 pages to avoid duplicate tracking
3. Other Tag Management Platforms
The Element451 Embed Code can be implemented through other tag management systems following similar principles:
Create a custom HTML tag with your Element451 Embed Code
Set the tag to fire on all pages of your website
Exclude Element451 pages to avoid duplicate tracking
Test and verify implementation
Consent-Aware Deployment
The Embed Code can wait for a visitor's consent decision before it runs analytics or keeps anything in the browser, and it can run without using browser storage at all. This section covers how to connect the Embed Code to your institution's consent manager, and how to deploy it in a storage-free mode.
📝 Note: These options apply to the Element451 Embed Code on your own website. Element451-hosted pages and sites are configured inside Element451 and are not affected by these settings.
What Remains Your Institution's Responsibility
These options give your web team control over when Element451 uses analytics and browser storage. Before you configure them, be clear on what stays on your side:
Your legal obligations. These settings do not determine your institution’s specific legal or policy requirements. Before implementing the Embed Code, confirm your approach with the people who own privacy compliance at your institution.
Your own tags. Your Google Tag Manager container and any tags you add through it are yours to manage. These settings do not affect them.
Storing the decision. Your consent manager records what the visitor chose. Supply that decision to the Embed Code on every page load - Element451 does not store your consent manager's record or restore it for you.
The Two Consent Decisions
Element451 recognizes two separate decisions:
Analytics - whether Element451 may record page views and link clicks and attach them to student profiles.
Optional storage - whether Element451 may keep information in the browser between visits, such as Messenger conversation continuity and Bolt Discovery threads.
Your consent manager likely uses its own category names. Your web team should map those categories onto these two decisions before you begin.
Each decision is one of granted, denied, or unknown. A decision stays in place until your site supplies a different one; it has no time-based expiry.
Installing with a Consent Manager
In this setup, Element451 holds back analytics and optional browser storage until your consent manager tells it what the visitor chose. Until a decision arrives, both decisions are treated as unknown: Element451 analytics do not run, and Messenger and Bolt Discovery work for the current visit only.
Step 1: Turn on consent enforcement
Add the data-consent-mode attribute to your Embed Code:
<script src="https://YOURSCHOOL.shell.451.io/" data-shell451 data-consent-mode="enforced"></script>
Or configure it before the Embed Code loads:
<script>
window.Shell451Config = {
consentMode: 'enforced'
};
</script>
<script src="https://YOURSCHOOL.shell.451.io/" data-shell451></script>
Step 2: Supply the visitor's decision
Call setConsent as soon as your consent manager resolves, and again every time the visitor changes their choice. No page reload is required - the change takes effect immediately.
window.Shell451.setConsent({
analytics: analyticsAllowed ? 'granted' : 'denied',
persistentStorage: functionalStorageAllowed ? 'granted' : 'denied'
});If you already know the visitor's decision when the page loads - for example, you read it from your own stored record - supply it up front instead of waiting, either in Shell451Config:
<script>
window.Shell451Config = {
consentMode: 'enforced',
consent: {
analytics: 'granted',
persistentStorage: 'denied'
}
};
</script>
or as attributes on the script tag:
<script src="https://YOURSCHOOL.shell.451.io/" data-shell451
data-consent-mode="enforced"
data-consent-analytics="granted"
data-consent-persistent-storage="denied"></script>
What each combination does
These outcomes apply when consent enforcement is turned on. unknown behaves the same as denied until a decision arrives.
Analytics denied, optional storage denied - no Element451 analytics; Messenger and Bolt Discovery work for the current visit only.
Analytics denied, optional storage granted - no Element451 analytics; Messenger conversations and Bolt Discovery threads carry over between visits.
Analytics granted, optional storage denied - analytics run without persistent browser identifiers; Messenger and Bolt Discovery work for the current visit only.
Analytics granted, optional storage granted - full behavior, with analytics and cross-visit continuity both available.
To check the current state at any time, call Shell451.getConsent() in your browser console.
Cookieless Deployment
Cookieless mode is a permanent policy for that installation of the Embed Code. Element451 never reads or writes browser storage on the page, regardless of any consent decision supplied later. Add the data-cookieless attribute to your Embed Code:
<script src="https://YOURSCHOOL.shell.451.io/" data-shell451 data-cookieless="true"></script>
In cookieless mode:
Messenger and Bolt Discovery remain available and work for the current visit. Conversations and threads are not carried over to a later visit.
Analytics still run, and they start immediately. Cookieless mode governs browser storage, not analytics — on its own it does not wait for a consent decision.
The policy cannot be reversed while the page is open. To return to standard behavior, remove the attribute and reload the page.
Element451 does not touch browser storage at all in this mode, so anything left by an earlier visit stays where it is. It is no longer read or used, but it is not deleted either.
⚠️ Note: Cookieless mode on its own does not delay analytics. A script tag carrying only data-cookieless="true" begins sending analytics on page load, before the visitor has made a choice. To hold analytics until the visitor decides, add data-consent-mode="enforced" as well.
While cookieless mode is active, analytics run anonymously:
No
element-idis read or written.No persistent analytics identifier is created.
Identifiers already in the browser are not read.
Links to other domains are not decorated with tracking parameters.
Visitor IP addresses are anonymized on Element451's servers.
Choosing the Right Combination
Consent enforcement and cookieless mode are separate settings, and they can be combined. Choose based on what your institution requires.
Element451 must not store anything in the browser or recognize a visitor across visits - add
data-cookieless="true"to your Embed Code.Element451 must not send analytics until the visitor consents - add both
data-cookieless="true"anddata-consent-mode="enforced", then supply the visitor's decision withShell451.setConsent().
<script
src="https://YOURSCHOOL.shell.451.io/"
data-shell451
data-cookieless="true"
data-consent-mode="enforced"
></script>
Then supply the decision:
Shell451.setConsent({
analytics: analyticsAllowed ? 'granted' : 'denied',
persistentStorage: 'denied'
});Because cookieless mode already prevents browser storage, persistentStorage is reported as denied.
Controlling Messenger Display
Messenger is delivered by the Embed Code, alongside website tracking. Because one piece of code provides both, you can hide Messenger on a page while tracking stays active - Messenger visibility and website tracking are controlled separately.
On Non-Element451 Pages (Your Website)
On Non-Element451 Pages (Your Website)
Configure display conditions in Element451:
Navigate to Engagement > Conversations > Settings
Select Messenger from the left menu
Under Conditions, click Add Filter
Choose a filter type (Page URL, Path URL, UTM Parameters)
Set the Operator and Value for the filter
Add as many filters as needed
On Element451 Pages
On Element451 Pages
Enable Messenger on your internal Element451 pages and sites by activating the 'Activate Messenger' setting for each module. This doesn't require any additional coding. For more details on this process, click here.
Important: Always configure conditions in Element451 rather than GTM. This ensures that the Embed Code still fires even if Messenger is hidden.
Best Practices
Test thoroughly - Use GTM Preview mode to verify the Embed Code fires correctly on your website but not on Element451 pages
Monitor data quality - Check Element451 profiles to confirm website activities are appearing correctly
Document your setup - Keep track of which domains and pages you've excluded from tracking
Coordinate with your team - Ensure your web/marketing teams understand the tracking setup
Review regularly - As you add new Element451 modules or change domains, update your exclusion triggers accordingly
Troubleshooting
Embed Code not firing on website:
Check that the GTM tag is published
Verify the trigger is configured correctly
Confirm the Element451 Embed Code is complete and unmodified
Duplicate tracking on Element451 pages:
Review your GTM trigger exclusions
Ensure all Element451 domains are properly excluded
Check that you haven't added the Embed Code directly to Element451 modules
Activities not appearing in profiles:
Verify students are known contacts in Element451
Check that the Embed Code matches your institution's configuration
Confirm GTM container is published and active
The consent setting seems to be ignored:
Check the browser console for a message beginning
[E451] Invalid consent configuration. Element451 logs the specific value it rejected and keeps the previous safe setting.Confirm that
window.Shell451Configis set before your Embed Code, not after.Run
Shell451.getConsent()in the console to see the decision Element451 currently holds.
Analytics are not recording after the visitor accepts:
Confirm your consent manager calls
Shell451.setConsent()when the visitor accepts, not only on the next page load.Confirm the script tag does not also carry
data-cookieless="true", which overrides storage grants.



