AudienceView Connect

av.cart - Dictionary Lookup Functions

av.cart.getPerformance(performance_id)

getPerformance is a dictionary lookup function that can be used to lookup additional information from the performances dictionary object. The function accepts a single performance GUID and returns the value of the attribute requested from the dictionary object.

Parameter

Type

Description

performance_id

string

The GUID of the performance supplied in either order_admissions or order_bundle_admissions

Example Usage:

Function Call

 

getPerformance("E83173A9-739F-4E24-812B-0F0F4912865C").venue_name

returns the venue_name for the supplied performance

Example Usage with Google Tag Manager:

First create a dataLayer variable macro within Google Tag Manager referencing the av.order object. Name the macro avCart

The follow custom HTML macro will return a comma separated list of all the distinct venues on the order.

 
function() {
 
var len = {{avCart}}.order_admissions.length;
var venues = new Object();
var text = "";
for (i=0; i < len; i++) {
venues[{{avCart}}.getPerformance({{avCart}}.order_admissions[i].performance_id).venue_name]=0;
 
}
 
for (var i in venues) {
if(text.length) { text += ",";}
text += i ;
}
return text;
 
}

top

av.cart.getBundle(bundle_id)

getBundle is a dictionary lookup function that can be used to lookup additional information from the bundles dictionary object. The function accepts a single bundle GUID and returns the value of the attribute requested from the dictionary object.

Parameter

Type

Description

bundle_id

string

The GUID of the bundle supplied in order_bundles

Example Usage:

Function Call

 

getBundle("E83173A9-739F-4E24-812B-0F0F4912865C").association

returns the association for the supplied bundle


top

av.cart.getMiscItem(miscitem_id)

getMiscItem is a dictionary lookup function that can be used to lookup additional information from the misc_items dictionary object. The function accepts a single miscellaneous item GUID and returns the value of the attribute requested from the dictionary object.

Parameter

Type

Description

miscitem_id

string

The GUID of the miscellaneous item supplied in order_misc_items

Example Usage:

Function Call

 

getMiscItem("E83173A9-739F-4E24-812B-0F0F4912865C").short_description

returns the short description for the supplied miscellaneous item


top

av.cart.getStoredValue(storedvalue_id)

getStoredValue is a dictionary lookup function that can be used to lookup additional information from the stored_values dictionary object. The function accepts a single stored value item GUID and returns the value of the attribute requested from the dictionary object.

Parameter

Type

Description

storedvalue_id

string

The GUID of the stored value item supplied in order_stored_values

Example Usage:

Function Call

 

getStoredValue("E83173A9-739F-4E24-812B-0F0F4912865C").short_description

returns the short description for the supplied stored value item


top

av.cart.getGift(gift_id)

getGift is a dictionary lookup function that can be used to lookup additional information from the gifts dictionary object. The function accepts a single gift GUID and returns the value of the attribute requested from the dictionary object.

Parameter

Type

Description

gift_id

string

The GUID of the gift supplied in order_gift

Example Usage:

Function Call

 

getGift("E83173A9-739F-4E24-812B-0F0F4912865C").short_description

returns the short description for the supplied gift