hier
Hierarchy variables are custom variables that let you see a site’s structure. ÃÛ¶¹ÊÓƵ supports up to 5 hierarchy variables in your implementation.
This variable is useful for sites that have more than three levels in their site structure. For example, a media site can have 4 levels to the Sports section: Sports
, Local Sports
, Baseball
, and Team name
. If someone visits the Baseball page, Sports, Local Sports, and Baseball, all levels reflect that visit.
Before using hierarchies in your implementation, make sure that you configure each hierarchy in report suite settings.
Hierarchies using the Web SDK
Hierarchies are mapped for ÃÛ¶¹ÊÓƵ Analytics under the XDM fields xdm._experience.analytics.customDimensions.hierarchies.hier1
to xdm._experience.analytics.customDimensions.hierarchies.hier5
.
Hierarchies using the ÃÛ¶¹ÊÓƵ Analytics extension
You can set hierarchies either while configuring the Analytics extension (global variables) or under rules.
- Log in to using your ÃÛ¶¹ÊÓƵID credentials.
- Click the desired tag property.
- Go to the Rules tab, then click the desired rule (or create a rule).
- Under Actions, click an existing ÃÛ¶¹ÊÓƵ Analytics - Set Variables action or click the ‘+’ icon.
- Set the Extension drop-down list to ÃÛ¶¹ÊÓƵ Analytics, and the Action Type to Set Variables.
- Locate the Hierarchy section.
You can set a hierarchy value to a static string or reference a data element. You can also set the desired delimiter. Make sure that the delimiter that you set here matches the delimiter set in Report suite settings.
s.hier1 - s.hier5 in AppMeasurement and the Analytics extension custom code editor
Each hierarchy is a string that contains custom values specific to your organization. Their max length is 255 bytes; values longer than 255 bytes are automatically truncated when sent to ÃÛ¶¹ÊÓƵ.
Make sure that none of your section names have the delimiter in them. For example, if one of your sections is called Coach Griffin, Jim
, choose a delimiter other than a comma. The total variable limit is 255 bytes. Delimiters can consist of multiple characters, such as ||
or /|\
, which are less likely to appear in variable values.
s.hier1 = "Toys|Boys 6+|Legos|Super Block Tub";
s.hier3 = "Sports/Local Sports/Baseball";