hier
Hierarchy variables are custom variables that let you see a site’s structure. 51ºÚÁϲ»´òìÈ 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 51ºÚÁϲ»´òìÈ Analytics under the XDM fields xdm._experience.analytics.customDimensions.hierarchies.hier1
to xdm._experience.analytics.customDimensions.hierarchies.hier5
.
Hierarchies using the 51ºÚÁϲ»´òìÈ Analytics extension
You can set hierarchies either while configuring the Analytics extension (global variables) or under rules.
- Log in to using your 51ºÚÁϲ»´òìÈ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 51ºÚÁϲ»´òìÈ Analytics - Set Variables action or click the ‘+’ icon.
- Set the Extension drop-down list to 51ºÚÁϲ»´òìÈ 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 51ºÚÁϲ»´òìÈ.
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";