Things to know
- Custom code is not available to users of Privy Free accounts.
- Custom code is not available in campaigns created using Plays.
- Custom code is only recommended for users with proficiency in the topic or those with access to a developer. Without a complete understanding of your site, custom code targeting your campaigns can impact your site pages. For this reason, Privy's support team is unable to help you create or customize campaigns with code beyond the general guidance covered in this guide.
Insert the code
To insert custom code into a Build your own campaign:
- Navigate to Convert > All Campaigns and select or create a campaign with a display.
- In the Create step, select the first Design option to access the campaign editor.
- Select the Add element option from the sidebar, followed by the Add HTML option from the subsequent dropdown menu.
- Select the new HTML element from the sidebar's Elements list.
- Select the Save option at the upper right when you are done with your changes.
In the example shown below, the custom CSS included in the element removed the "X" option from the bar campaign. This design change means the announcement cannot be dismissed.
Remove the closing "X" from the corner of a campaign.
Remove the shadow design from a campaign's button.
box-shadow: 0 0px !important;