zip
The zip
variable allows you to manually populate the ‘Zip Code’ dimension if the Zip Option in report suite settings allows it. In previous versions of Adobe Analytics, this variable could only be manually set, typically when entering shipping information on a retail site. Improvements to Adobe Analytics allows this variable to be automatically set using geo-location data. This variable does not persist beyond the hit it is set.
Zip code using the Web SDK
Zip code is mapped to the following variables:
- XDM object:
xdm.placeContext.geo.postalCode
- Data object:
data.__adobe.analytics.zip
Zip code using the Adobe Analytics extension
You can set Zip code either while configuring the Analytics extension (global variables) or under rules.
- Log in to Adobe Experience Platform Data Collection using your AdobeID 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 Adobe Analytics - Set Variables action or click the ‘+’ icon.
- Set the Extension drop-down list to Adobe Analytics, and the Action Type to Set Variables.
- Locate the Zip section.
You can set Zip Code to any string value, including data elements.
s.zip in AppMeasurement and the Analytics extension custom code editor
The s.zip
variable is a string that typically contains a Zip Code, but can contain any desired value up to 50 bytes in length.
s.zip = "84043";