Using tags


Using tags

Tags allow you to categorize and filter events in the Product Adoption interface. They are particularly useful for distinguishing different products or environments (desktop application, mobile, etc.).

Info

The Javascript code below must be executed after initialization of the Skalin script.

# Global tags configuration

You can define global tags that will be automatically sent with all identity and feature events:

<script type="text/javascript">
ska(function(skalin){
   skalin.tags(['Product1', 'Mobile']);
});
</script>;
1
2
3
4
5

These tags will be applied to all following events (identity and feature) until they are modified.

tags Array of strings representing the tags to apply

Warning

You must call the skalin.tags(...); method before any other SDK methods (identity, feature).

# Event-specific tags

It is also possible to add specific tags to a particular event via the tags property in the identity and feature methods.

Event-specific tags will be deduplicated and merged with global tags defined via skalin.tags().

See the following pages for more details:

# Usage examples

# Differentiate products

<script type="text/javascript">
ska(function(skalin){
   skalin.tags(['ProductA']);
});
</script>;
1
2
3
4
5

# Distinguish platforms

<script type="text/javascript">
ska(function(skalin){
   skalin.tags(['Mobile', 'iOS']);
});
</script>;
1
2
3
4
5

# Combine global and specific tags

<script type="text/javascript">
ska(function(skalin){
   // Global tags applied to all events
   skalin.tags(['ProductB']);

   // Specific tag for this event only
   skalin.feature({
     name: 'Import CSV',
     tags: ['Desktop']
   });
});
</script>;
1
2
3
4
5
6
7
8
9
10
11
12
Contributors: Julien