---
schema_version: "1"
id: 7e5a6e0cb8c1fa3f3ff52d6d8ac40837c2f04717fbcde7e1ea8eb221b512ff06
title: Embed Code for Custom Views
collection: tableau
version: next
locale: en-gb
portal_url: https://docs.salesforce.com/tableau/next/en-gb/pro/desktop/embed_code_custom_view.md
canonical_url: https://help.tableau.com/v0.0/pro/desktop/en-gb/embed_code_custom_view.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 0a518b5d639c23dc9e588260130910f28c8d52c615121bd7468f55de9ccaa44d
description: The embed code for Tableau Server 2022
---
[Skip to main content](#main-content)

# Embed Code for Custom Views

> [!TIP]
> 
> The embed code for Tableau Server 2022.3 and later and Tableau Cloud has changed to use the Embedding API v3. For current information on embedding custom views, see [Embed Custom Views](https://help.tableau.com/current/api/embedding_api/en-gb/docs/embedding_api_custom_views.html) in the [Embedding API help](https://help.tableau.com/current/api/embedding_api/en-gb/index.html). The information in this topic is for prior versions of embedding (using the Tableau JavaScript API v1 and v2).

Embed custom views using prior versions of embedding

When you embed a custom view of a workbook or sheet, the default view is determined by these factors:

- If the embed code URL specifically refers to a custom view, that view is displayed by default.
- If the embed code URL does not refer to a custom view, the Default custom view is displayed by default.
- If no Default custom view has been defined, the original view is displayed by default.

**Note:** To ensure the original view will be displayed by default in an embedded view, make sure the embed code URL for the name parameter does not explicitly refer to a custom view, and include the following `filter` parameter in the embed code: `<param name='filter' value=':original_view=yes'/>`.

In the following example, the embed code will always display the original view of the Profit Analysis sheet in the Profit Analysis workbook, because the `filter` parameter is set to `:original_yes`, and the `name` parameter does not refer to a specific custom view in the URL for the sheet.

<script type='text/javascript' src='http://mysite.myserver.com/javascripts/api/viz\_v1.js'></script>
  <div class='tableauPlaceholder' style='width: 1496px; height: 749px;'>
  <object class='tableauViz' width='1496' height='749' style='display:none;'>
  <param name='host\_url' value='http://mysite.myserver.com' />
  <param name='site\_root' value='' />
  <param name='name' value='ProfitAnalysis/ProfitAnalysis' />
  <param name='tabs' value='yes' />
  <param name='toolbar' value='yes' />
  <param name='filter' value=':original\_view=yes' /></object></div>

In this example, the setting for the `name`parameter in this example specifically refers to the URL for a custom view named Furniture (in the Profit Analysis sheet in the Profit Analysis workbook).

<script type='text/javascript' src='http://mysite.myserver.com/javascripts/api/viz\_v1.js'></script>
  <div class='tableauPlaceholder' style='width: 1496px; height: 749px;'>
  <object class='tableauViz' width='1496' height='749' style='display:none;'>
  <param name='host\_url' value='http://mysite.myserver.com' />
  <param name='site\_root' value='' />
  <param name='name' value='ProfitAnalysis/ProfitAnalysis/Furniture' />
  <param name='tabs' value='yes' />
  <param name='toolbar' value='yes' /></object></div>

In this example, the `name` parameter does not refer to a specific custom view in the URL for the sheet, and the `original_view` parameter has not been specified. The embed code here will display the custom view that has been set to Default in the Profit Analysis sheet in the Profit Analysis workbook. However, if the original view is still the Default (no other custom view has been set to Default), then the original view will be displayed as the default view.

<script type='text/javascript' src='http://mysite.myserver.com/javascripts/api/viz\_v1.js'></script>
  <div class='tableauPlaceholder' style='width: 1496px; height: 749px;'>
  <object class='tableauViz' width='1496' height='749' style='display:none;'>
  <param name='host\_url' value='http://mysite.myserver.com' />
  <param name='site\_root' value='' />
  <param name='name' value='ProfitAnalysis/ProfitAnalysis' />
  <param name='tabs' value='yes' />
  <param name='toolbar' value='yes' /></object></div>