Manage custom snippets

  • Updated
  • Optimizely Web Experimentation

Custom snippets determine what projects and pages go into your snippet. Custom snippet permissions are based on the collaborator role. If the custom snippet feature is enabled for your account, collaborators can view your account's snippets and copy snippet codes.

Administrators can create, edit, and archive custom snippets for any project in their accounts.

Project Owners can create custom snippets for their projects. They can also edit and archive custom snippets—as long as they have owner permissions on the projects included in the snippet. For example, to edit or archive a custom snippet that includes multiple projects, a user must be a Project Owner for every project in the snippet.

Create a custom snippet

  1. If you want to include more than one project in your custom snippet, confirm that all of the projects you want to include are linked projects.
  2. Go to Settings > Implementation and click Create Custom Snippet...

    Administrators can also access custom snippets by navigating to Account Settings > Snippets and clicking Create Custom Snippet...

  3. In the Create Custom Snippet dialog, specify the settings you want for the snippet.
    See Custom snippet option below for more information about the settings you can choose.


  4. Click Save.
When you create a custom snippet, the project you are currently in is included in the custom snippet by default.

For custom snippets, integration and project JavaScript settings are not explicitly defined. Instead, they are inherited from the project the custom snippet pulls from.

Custom snippet options

  • Name – User-friendly name for the custom snippet; appears in the dashboard and elsewhere in the UI
  • Key – Unique snippet identifier that's included in the snippet URL; must be unique to the account[account_id]/s/[developer_key].js
  • Description – Optional summary of how the snippet is generated and where it will go
  • Type – Choose whether the snippet is for a single project or for linked projects.



  • Project – Specific projects the snippet should pull from (for linked projects); default is a single-project snippet for the current project
  • Pages – Pages to include and exclude from the snippet (default is to include all pages in the project)


Snippet Details

  • Displays platform, snippet size, and project ID.

Visitor ID

  • Select from the following identifier types:



  • jQuery Inclusion – Version of JQuery to include with the snippet; should be the same version specified in your project settings.
  • Privacy – Desired privacy settings.
  • Cache Expiration – Select 0-60 minutes from the drop-down menu, and select from the other options.

View and manage custom snippets

Administrators can view and manage all custom snippets for their accounts. Go to Account Settings Snippets.


All collaborators can view snippets for the current project by navigating to Settings Implementation. As long as the project has at least one custom snippet, you'll see a dashboard that lists all basic and custom snippets that are associated with the project.


Administrators and Project Owners can click a custom snippet name to edit the snippet settings. They can also archive custom snippets by clicking More (...). Remember, Project Owners must be owners of all projects included in a custom snippet to edit or archive the snippet.


You cannot archive basic snippets.