new ATInternet.Tracker.Tag(config, context, callback)
| Name | Type | Description |
|---|---|---|
config |
object | Configuration of the Tag |
context |
object | Context of the Tag |
callback |
function | Executed when tracker is ready |
Members
-
bufferBufferManager
-
Module for buffer management.
- See:
-
builderBuildManager
-
Module for hit builder.
- See:
-
callbacksCallbacksManager
-
Module for callback management.
- See:
-
pluginsPluginsManager
-
Module for plugins management.
- See:
-
triggersTriggersManager
-
Module for triggers management.
- See:
-
inneraisleobject
-
[Object added by plugin SalesTracker] Tags to track aisle values.
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#aisle.set -
innercartobject
-
[Object added by plugin SalesTracker] Tags to track cart values.
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#cart.set addfunction Tag helper, see details here ATInternet.Tracker.Tag#cart.add -
innerclickobject
-
[Object added by plugin Clicks] Tags for clicks.
Properties:
Name Type Description sendfunction Tagging method for clicks (helper), see details here ATInternet.Tracker.Tag#click.send setfunction Alternative tagging method for clicks (helper), see details here ATInternet.Tracker.Tag#click.set -
innerclickListenerobject
-
[Object added by plugin Clicks] Tags for clicks using a listener.
Properties:
Name Type Description sendfunction Tagging method for clicks (helper), see details here ATInternet.Tracker.Tag#clickListener.send -
innerclientSideUserIdobject
-
[Object added by plugin ClientSideUserId] Tags to manage a user ID on client side mode.
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#clientSideUserId.set -
innercustomTreeStructureobject
-
[Object added by plugin Page] Tags to obtain a completely customised view of all your traffic.
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#customTreeStructure.set -
innercustomVarsobject
-
[Object added by plugin Page] Tags to associate page and site variables specific to your activity.
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#customVars.set -
innerdynamicLabelobject
-
[Object added by plugin Page] Tags to track the history of a page whose content has been modified.
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#dynamicLabel.set -
innerecommerceobject
-
[Object added by plugin Ecommerce] Tags to manage ecommerce sending.
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.displayProduct.products.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.displayPageProduct.products.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.addProduct.cart.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.addProduct.products.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.removeProduct.cart.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.removeProduct.products.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.displayCart.cart.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.displayCart.products.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.updateCart.cart.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.deliveryCheckout.cart.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.deliveryCheckout.shipping.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.paymentCheckout.cart.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.paymentCheckout.shipping.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.transactionConfirmation.cart.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.transactionConfirmation.discount.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.transactionConfirmation.transaction.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.transactionConfirmation.shipping.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.transactionConfirmation.payment.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.transactionConfirmation.customer.set setfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.transactionConfirmation.products.set resetfunction Tag helper, see details here ATInternet.Tracker.Tag#ecommerce.reset -
innereventobject
-
[Object added by plugin Event] Tags to manage event sending.
Properties:
Name Type Description resetfunction Tag helper, see details here ATInternet.Tracker.Tag#event.reset sendfunction Tag helper, see details here ATInternet.Tracker.Tag#event.send setfunction Tag helper, see details here ATInternet.Tracker.Tag#event.set -
inneridentifiedVisitorobject
-
[Object added by plugin IdentifiedVisitor] Tags to identify a visitor.
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#identifiedVisitor.set unsetfunction Tag helper, see details here ATInternet.Tracker.Tag#identifiedVisitor.unset -
innerinternalSearchobject
-
[Object added by plugin InternalSearch] Tags to manage internal searches data.
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#internalSearch.set sendfunction Tag helper, see details here ATInternet.Tracker.Tag#internalSearch.send -
innermvTestingobject
-
[Object added by plugin MvTesting] Tags to manage multivariate testing data.
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#mvTesting.set addfunction Tag helper, see details here ATInternet.Tracker.Tag#mvTesting.add -
innerofflineobject
-
[Object added by plugin Offline] Tags to manage local storage.
Properties:
Name Type Description getLengthfunction Tag helper, see details here ATInternet.Tracker.Tag#offline.getLength removefunction Tag helper, see details here ATInternet.Tracker.Tag#offline.remove getfunction Tag helper, see details here ATInternet.Tracker.Tag#offline.get sendfunction Tag helper, see details here ATInternet.Tracker.Tag#offline.send -
innerorderobject
-
[Object added by plugin SalesTracker] Tags to track order values.
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#order.set -
innerpageobject
-
[Object added by plugin Page] Tags to manage a page.
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#page.set sendfunction Tag helper, see details here ATInternet.Tracker.Tag#page.send resetfunction Tag helper, see details here ATInternet.Tracker.Tag#page.reset -
innerproductobject
-
[Object added by plugin SalesTracker] Tags to track viewed products.
Properties:
Name Type Description addfunction Tag helper, see details here ATInternet.Tracker.Tag#product.add -
innerpublisherobject
-
[Object added by plugin OnSiteAds] Tags for publisher campaigns
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#publisher.set addfunction Tag helper, see details here ATInternet.Tracker.Tag#publisher.add sendfunction Tag helper, see details here ATInternet.Tracker.Tag#publisher.send -
innerrichMediaobject
-
[Object added by plugin RichMedia] Tags to manage media measurement.
Properties:
Name Type Description addfunction Tag helper, see details here ATInternet.Tracker.Tag#richMedia.add removefunction Tag helper, see details here ATInternet.Tracker.Tag#richMedia.remove removeAllfunction Tag helper, see details here ATInternet.Tracker.Tag#richMedia.removeAll sendfunction Tag helper, see details here ATInternet.Tracker.Tag#richMedia.send -
innerselfPromotionobject
-
[Object added by plugin OnSiteAds] Tags for self-promotion campaigns
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#selfPromotion.set addfunction Tag helper, see details here ATInternet.Tracker.Tag#selfPromotion.add sendfunction Tag helper, see details here ATInternet.Tracker.Tag#selfPromotion.send -
innerstorageobject
-
[Object added by plugin Storage] Methods to manage data to store.
Properties:
Name Type Description getfunction Tag helper, see details here ATInternet.Tracker.Tag#storage.get getPrivatefunction Tag helper, see details here ATInternet.Tracker.Tag#storage.getPrivate setfunction Tag helper, see details here ATInternet.Tracker.Tag#storage.set setPrivatefunction Tag helper, see details here ATInternet.Tracker.Tag#storage.setPrivate delfunction Tag helper, see details here ATInternet.Tracker.Tag#storage.del delPrivatefunction Tag helper, see details here ATInternet.Tracker.Tag#storage.delPrivate cacheInvalidationfunction Tag helper, see details here ATInternet.Tracker.Tag#storage.cacheInvalidation -
innertagsobject
-
[Object added by plugin Page] Tags to define the theme(s) of the content your users visit.
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#tags.set -
innerversionstring
-
Version of the tracker.
-
innerweboramaobject
-
[Object added by plugin Weborama] Tags to collect marketing data from Weborama Partner.
Properties:
Name Type Description setfunction Tag helper, see details here ATInternet.Tracker.Tag#weborama.set callbackfunction Tag helper, see details here ATInternet.Tracker.Tag#weborama.callback
Methods
-
configPlugin(plg, cfg, callback){object}
-
Set the specific configuration of a plugin. If the configuration already exists, set only the undefined properties.
Name Type Description plgstring Name of the plugin concerned cfgobject Value of the plugin configuration callbackfunction Function which be called if the plugin configuration change -
debug(trigger, level, message, details)
-
Use to emit debug triggers.
Name Type Description triggerstring Trigger that you want to emit levelstring DEBUG, ERROR, WARNING messagestring details* Data you want to transmit to listeners Example
tag.debug('RichMedia:richMedia:remove', 'DEBUG', 'method ended', {playerId: plyr, media: mediaObject}); -
delContext(key1, key2)
-
Delete context value or parameter value in context(s).
Name Type Description key1string Context name key2string Context parameter name (first level) Example
tag.delContext('myContext'); //=> Delete 'myContext' content tag.delContext('myContext', 'param'); //=> Delete 'param' content in 'myContext' tag.delContext(undefined, 'param'); //=> Delete 'param' content in all contexts -
delParam()
-
Use to delete a stored parameter.
- See:
-
emit(trigger, data)
-
Use to trigger event.
Name Type Description triggerstring Trigger to emit dataobject Data to transmit to listeners - See:
Example
tag.emit('RichMedia:richMedia:remove', { lvl: 'DEBUG', msg: 'method ended', details: {playerId: plyr, media: mediaObject} }); -
getConfig(key){*}
-
Get configuration.
Name Type Description keystring Configuration property name Returns:
property value if exist, undefined if not
-
getContext(key){*}
-
Get a context variable.
Name Type Description keystring Context variable name -
getParam(filterList, withOptions){string|object}
-
Get variables from the buffer using the filter given, with possibility of returning options or not.
Name Type Description filterListArray List of key/value(s) in an array. (ex : [[key1,value1],[key2,[value2A,value2B]]]) Filter on variable's options withOptionsboolean If true only returns value else returns object with value and options - See:
Example
// This filter will get variables with hitType 'page' OR 'all', AND with permanent true var filter = [ ['hitType',['page','all']], ['permanent',true] ] var dataObj = tag.getParam(filter, true); // true to get options dataObj = { 'variableExample' : { value:'value', options: { hitType:['page'], permanent:true } } } var dataObj = tag.getParam(filter); // no option in results dataObj = { 'variableExample':'value' } -
getParams(param){string|object}
-
Use to get the collection of hit parameters stored (or a value if a parameter name is given).
Name Type Description paramstring Parameter name (optional) - See:
-
onTrigger(trigger, callback){number}
-
Use to add a trigger listener.
Name Type Description triggerstring Trigger you want to subscribe callbackfunction Method that you want to be triggered - See:
Returns:
ID
Example
// It returns the ID of the callback so you can delete it if needed. var idCallback = tag.onTrigger('myTrigger', callback(trig, data, idCallbackBis){}); -
sendHit(customParams, filters, callback, forcedDomain)
-
Send the hit and call the callback if present The hit will integrate parameters stored
Name Type Description customParamsobject Object which contains some hit parameters that you would like to send specifically (they are given priority over the current buffer) filtersArray List of buffer filters callbackfunction Callback to execute forcedDomainString Force the domain of the base URL - See:
-
sendUrl(hit)
-
Send single hit from complete url. An event will be sent thanks to TriggersManager :
- "Tracker:Hit:Sent:Ok" with the hit as data if succeed,
- "Tracker:Hit:Sent:Error" with error as data otherwise.Name Type Description hitstring Url to send - See:
-
setConfig(key, value, ifNotExist){*}
-
Set configuration.
Name Type Description keystring Configuration property name value* Configuration property value ifNotExistboolean If true, the property will only be set if the configuration property doesn't exist -
setContext(key, value)
-
Set a context variable.
Name Type Description keystring context variable name value* -
setParam(name, value, options)
-
Set value for a hit variable (overrides if present).
Name Type Description namestring Name of the hit variable valuestring | number | function | Array value of the hit variable optionsobject Configuration of the variable, if no hitType defined, it will be "page" by default - See:
Example
tag.setParam('test1', 'val1', {hitType: ['test', 'click'], permanent: true, encode: true}); -
innerdispatch(callback)
-
[Helper added by plugin Utils] Dispatch all tags.
Name Type Description callbackfunction Callback to execute -
innerdispatchRedirect(tagObject){boolean}
-
[Helper added by plugin Utils] Dispatch all tags (with automatic redirect management).
Name Type Description tagObjectobject Tag object, used here to tell how we have to do the redirection (url/target)
