This repository was archived by the owner on May 5, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Asynchronous tag
Benjamin Diolez edited this page May 5, 2026
·
1 revision
You may load our JavaScript library asynchronously. However, this requires an adaptation in your tagging.
- Declare the ATInternet callback in the following manner
window.ATInternet = window.ATInternet || {};
window.ATInternet.onTrackerLoad = function(){
window.tag = new window.ATInternet.Tracker.Tag();
// your tag
};In this way, you declare the function onTrackerLoad in the global object ATInternet. This function is then automatically called when the file smarttag.js finishes execution.
- Load our JavaScript library asynchronously
(function(){
var at=document.createElement('script');
at.type='text/javascript';
at.async=true;
at.src='http://www.site.com/smarttag.js';
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]||document.getElementsByTagName('script')[0].parentNode).insertBefore(at,null);
})();<script type="text/javascript">
window.ATInternet = window.ATInternet || {};
window.ATInternet.onTrackerLoad = function(){
window.tag = new window.ATInternet.Tracker.Tag();
// your tag
};
(function(){
var at=document.createElement('script');
at.type='text/javascript';
at.async=true;
at.src='http://www.site.com/smarttag.js';
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]||document.getElementsByTagName('script')[0].parentNode).insertBefore(at,null);
})();
</script>The URL of the smarttag.js file must be replaced by the file path on your server.
Declaration of the callback onTrackerLoad must always be done before loading the smarttag.js file.
Remember, the feature tag.clickListener measures an element that must exist at the moment that the feature is used
Last update: 04/03/2019
-
Data API
- Data flow
- Advice optimizations data flow
- Error codes data flow
- Faq data flow
- General information data flow
- Technical information data flow
- Reporting API v3
- Getting started
- Methods
- Parameters
- Technical information
- REST API
- Campaigns
- Custom variables
- Getting started rest
- Methods rest
- Response structure parameters rest
- Fixed periods
- Parameters compatibility
- Relative periods
- Structure of the response
- “code” parameter
- “columns” parameter
- “evo” parameter
- “filter” parameter
- “include” parameter
- “lng” parameter
- “max-results” parameter
- “page-num” parameter
- “period” parameter
- “period” parameter: “H” v. “He” & “MN” v. “MNe”
- “retention” parameter
- “segmentdesc” parameter
- “segment” parameter
- “sep” parameter
- “sort” parameter
- “space” parameter
- Technical specifications rest
- Data flow
-
Data collection
- Android
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- Apple
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- General
- Cddc renew staging process
- Changelog
- Craft your hit
- Encoded parameters
- Server side cookie management
- Supported taggings
- Tagging deletion
- Utilisation of dispatch sdks
- JavaScript
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Partners javascript
- Users
- Piano Analytics
- Event tagging piano analytics
- Getting started piano analytics
- Piano analytics tagging
- Feeding piano analytics with as2 tagging
- Tagging custom properties sdk
- Android