Add custom attributes in Optimize to filter results and/or target visitors with optimizations.
Note
The ability to enable custom attributes in Optimize is available only with an Enterprise plan.
Attributes are characteristics associated with your visitors (e.g., demographics). You can use a Webflow API to set custom attributes for visitors that leverage data you’ve learned, collected, or acquired. In Optimize, you can then add custom attributes to leverage as optimization results filters or as optimization audiences to target visitors.
How to set custom attributes for each visitor
To set a custom attribute, you can use the wf.setAttributes()
Browser API. Review the API documentation to learn more.
How to enable a custom attribute in Optimize
Open the site in Webflow, then:
- Go to the Insights tab
- Click Integrations
- Go to Custom JavaScript attributes
- Click Add JavaScript attribute (for the first entry) or Edit > New entry (for subsequent entries)
- Enter the attribute name you set with the API
- Click Save
How to delete a custom attribute from Optimize
Open the site in Webflow, then:
- Go to the Insights tab
- Click Integrations
- Go to Custom JavaScript attributes
- Click Edit
- Click the Delete icon to the right of the entry
- Click Save
How to leverage custom attributes in Optimize
Custom attributes added to Optimize are available as optimization results filters and as attributes for rules-based audiences.