Add or edit a custom attribute

Customer data platform

Needed permissions: owner or manage

Our Customer Data Platform (CDP) comes with 80+ default user attributes, including device, location and traffic source. It fetches data for these attributes from Analytics. However, you can easily add new attributes and choose where the data comes from.

In this article, we’ll explain how to add custom attributes and edit them if necessary.

Before you start

Here are a few helpful things to know before you start:

  • Custom attributes can’t be deleted. But you can always edit them and change their name and data source.

Add a custom attribute

To add a custom attribute, follow these steps:

  1. Go to Menu > Customer Data Platform.
  2. Navigate to Attributes.
  3. Click Add a custom attribute.

    Note: You can also create a custom attribute by clicking the ⋯ three-dot icon next to the existing attribute and selecting ‘Create from‘. This option allows you to generate a new attribute based on the existing one and is often used to change the aggregation method.

  4. Name your attribute.
  5. Select an attribute type. The options are: number, string, IP, bool or date and time.
    Add or edit a custom attribute in Piwik PRO
  6. Choose an aggregation method. The available methods depend on the attribute type you’ve selected. The options include: first, last, first & last, list, list unique, maximum, minimum or sum.
    Add or edit a custom attribute in Piwik PRO

    Note: Aggregation methods determine how data is combined. For example, ‘first’ and ‘last’ return the initial and final values, ‘list’ displays all values, ‘maximum’ and ‘minimum’ give the highest and lowest values, and ‘sum’ provides the total.

  7. Click Advanced settings.
  8. Choose the source for your attribute data. The available options are:
    • Data import: Use this option if you want to fetch data from external sources like marketing automation tools, CRMs or advertising platforms.
    • Analytics: Use this option if you want to use Analytics data. This is useful if you want to change the aggregation method.
    Add or edit a custom attribute in Piwik PRO
  9. Click Save.
  10. All set! If you’ve chosen data import as your source, now make sure the data gets fetched from your external source. You can do this through the user interface or API.

Edit a custom attribute

To edit a custom attribute, follow these steps:

  1. Go to Menu > Customer Data Platform.
  2. Navigate to Attributes.
  3. Select User attributes.
  4. Find the attribute you want to edit in the list.
  5. Click the ⋯ three-dot icon next to your attribute.
    Add or edit a custom attribute in Piwik PRO
  6. Click Edit.
  7. Edit the attribute detail and click Save.
  8. All done!

Default attributes

Here’s a list of the default attributes available in our CDP.

Attribute name Event data key Type Aggregation Category
Consent to A/B testing and personalization analytics.consent_type_ab_testing_personalization Bool Last Consent
Consent to analytics analytics.consent_type_analytics Bool Last Consent
Consent to conversion tracking analytics.consent_type_conversion_tracking Bool Last Consent
Consent to marketing automation analytics.consent_type_marketing_automation Bool Last Consent
Consent to remarketing analytics.consent_type_remarketing Bool Last Consent
Consent to user feedback analytics.consent_type_user_feedback Bool Last Consent
Custom consent analytics.consent_type_custom_1 Bool Last Consent

Device & platform

Attribute name Event data key Type Aggregation Category
Browser engine analytics.browser_engine String First & Last Device & platform
Browser language analytics.browser_language_iso639 String First & Last Device & platform
Browser name analytics.browser_name String First & Last Device & platform
Browser version analytics.browser_version String First & Last Device & platform
Device brand analytics.device_brand String First & Last Device & platform
Device model analytics.device_model String First & Last Device & platform
Device type analytics.device_type Number First & Last Device & platform
IPv4 address analytics.location_ipv4 Ip First & Last Device & platform
IPv6 address analytics.location_ipv6 Ip First & Last Device & platform
Operating system analytics.operating_system String First & Last Device & platform
Operating system version analytics.operating_system_version String First & Last Device & platform
Resolution analytics.resolution String First & Last Device & platform
Resolution height analytics.resolution_height Int First & Last Device & platform
Resolution width analytics.resolution_width Int First & Last Device & platform

Location

Attribute name Event data key Type Aggregation Category
City analytics.location_city_geoname_id Number First & Last Location
Continent analytics.location_continent_iso_code String First & Last Location
Country analytics.location_country_iso_code String First & Last Location
Latitude analytics.location_latitude Number First & Last Location
Longitude analytics.location_longitude Number First & Last Location
Organization analytics.location_organization String First & Last Location
Provider analytics.location_provider String First & Last Location
Subdivision analytics.location_subdivision_1_iso_code String First & Last Location
Subdivision 2 analytics.location_subdivision_2_iso_code String First & Last Location

Traffic

Attribute name Event data key Type Aggregation Category
Campaign content analytics.campaign_content String First & Last Traffic
Campaign ID analytics.campaign_id String First & Last Traffic
Campaign name analytics.campaign_name String First & Last Traffic
Channel analytics.referrer_type Number First & Last Traffic
Gclid analytics.campaign_gclid String List unique Traffic
Keyword analytics.keyword String First & Last Traffic
Referrer URL analytics.referrer_url String First & Last Traffic
Source analytics.source No case First & Last Traffic
Source / medium analytics.source_medium No case First & Last Traffic

User

Attribute name Event data key Type Aggregation Category
First activity time analytics.server_time Date Time Minimum User
First visited page URL analytics.event_url String First User
Goal names analytics.goal_uuid String List unique User
Last activity time analytics.server_time Date Time Maximum User
Last order time analytics.order_time Date Time Maximum User
Last visited page URL analytics.event_url String Last User
Total goal revenue analytics.goal_revenue Number Sum User
Total revenue analytics.revenue Number Sum User

User identifiers

Attribute name Event data key Type Aggregation Category
Cookie ID analytics.cookie_id_hex Hex List unique User identifiers
User ID analytics.user_id String List unique User identifiers
Visitor ID analytics.visitor_id_hex Hex List unique User identifiers

Watch more tutorials on YouTube:

Was this article helpful?

Technical support

If you still have any questions, visit our community.
There’s always someone happy to help!

Back to help center