
You can clone the following analyses between workspaces:


- funnels,
- segmentations,
- metrics,
- histograms,
- reports,
- trends,
- Sankey diagrams,
- aggregates,
- expressions,
- dashboards

To learn the basics of cloning, read the [Introduction to cloning](/docs/settings/workspace/cloning-objects/introduction-to-cloning) article.

## Prerequisites
---
To clone objects between workspaces you must be assigned a user role that has the following permissions in the source and target workspaces:

- The Cloning module set to **Read** and **Create**
- In the Analytics module, set the permission for each component which you plan to clone to other workspaces to **Read**, **Create**, and **Update**.

## Cloning objects
---
1. To clone an object, click <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Decision Hub icon" class="icon" > and select the analysis type.
2. On the list of analyses, find the analysis you want to clone.
3. To the right side of the analysis author information, click <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/threedoticon.png" alt="Three-dot icon" class="icon">.
4. From the context menu, select **Clone to workspace**.  
    **Result**: The **Choose destination** pop-up appears.
5. On the pop-up, select the workspace or workspaces to which you want to clone your analysis.  
    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/settings/_gfx/choose-workspace-to-clone.png" class="large" alt="A pop-up with selection of workspaces"><figcaption>A pop-up with selection of workspaces</figcaption></figure>
    
   <div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   You can select up to 5 target workspaces at the same time.

   </div></div></div>

6. Confirm your choice by clicking **Next**.  
    **Result**: You are directed to the mapping wizard.

### Cloning an object that doesn't exist in the target workspace

The procedure of cloning an object that doesn't exist in the target workspaces involves only mapping the events and/or parameters included in the cloned analysis with the events and/or parameters existing in the target workspace.  

If events or parameters from the cloned objects exist in the target workspaces, in the **Mapping events** section, the text on the button says **Change solutions**. Optionally, you can change the mapping settings by following the instruction below: 


<details class="accordion"><summary>Clone an analysis that contains compatible events</summary><div class="accordion-content"><ol> <li>In the mapping section, click <strong>Change solutions</strong>.</li> <li>Next to the target workspace name, click the downward arrow icon. </li> <li>Verify that the system mapped the events correctly. The system automatically mapped the events because in both workspaces there is an event with the same action name.</li> <li>Optionally, from the dropdown list under the name of the target workspace, select a different event to map in the target workspace than the one selected by the system. <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/settings/_gfx/clone-compatible.png" class="large" alt="Mapping events compatible in the source and target workspaces"><figcaption>Mapping events compatible in the source and target workspaces</figcaption></figure></li> <li>If applicable, repeat steps 2-4 for other workspaces.</li> <li>When all events and their parameters (if there are any) are mapped, confirm the mapping settings by clicking <strong>Apply</strong>. </li> <li>In the upper right corner, click <strong>Clone</strong>.</li> </ol></div></details>


If events or parameters from the cloned objects don't exist in the target workspaces, in the **Mapping events** section, the text on the button says **Solve issues**. Map the parameters by following the instruction below: 


<details class="accordion"><summary>Clone an analysis that contains incompatible events/event parameters</summary><div class="accordion-content"><ol> <li>In the mapping section, click <strong>Solve issues</strong>.</li> <li>Next to the target workspace name, click the downward arrow icon. </li> <li>On the dropdown list, perform one of the following actions:<ul> <li>Create the missing parameter in the target workspace by clicking <strong>Create <code>[parameter name]</code></strong>.</li> <li>Select an existing parameter in the target workspace under which the values of the parameter from the source workspace will be saved in the cloned object.</li> </ul> <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/settings/_gfx/clone-and-create-event.png" class="large" alt="Mapping event parameters that don't exist in the target workspace"><figcaption>Mapping event parameters that don't exist in the target workspace</figcaption></figure></li> <li>If applicable, repeat steps 2 and 3 for other workspaces. </li> <li>When all events and parameters are mapped, confirm the mapping settings by clicking <strong>Apply</strong>.</li> <li>In the upper right corner, click <strong>Clone</strong>.</li> </ol></div></details>


### Cloning an object that exists in the target workspace

When you clone an object and an object with the same name exists, you need to resolve the conflict. Remember that objects may be named identically by coincidence. Before you decide to use the "overwrite" option, make sure that you're not overwriting something that should not be overwritten.

1. In the **Objects to clone** section, click **Solve issues**.  
2. Next to the target workspace name, click the downward arrow icon.  
    **Result**: The list displays the analysis to be cloned which also exists in the target workspace. If the analysis contains other analyses which are also present in the target workspace, the list includes them.
3. You can perform one of the following actions for each conflicting object:
    - To overwrite the object in the target workspace with the object from the source workspace, click **Update**.  
    - To skip cloning the object to the target workspace, click **Don't update**.  
    - To create a copy of the object from the source workspace in the target workspace, click **Create a copy**. The word `copy` will be added to the name of the cloned object in the target workspace.

    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/settings/_gfx/clone-existing-objects.png" class="large" alt="Resolving conflicts"><figcaption>Resolving conflicts</figcaption></figure>

5. If applicable, repeat steps 2 and 3 for other workspaces.
4. Confirm the settings by clicking **Apply**.
5. In the **Mapping events** section, click **Change solutions** (or **Solve issues**, the text on the button depends on whether the events and/or attributes in cloned objects are compatible).
6. If the events and attributes are not compatible, under the name of the target workspace, on the dropdown list:
    - Create the missing parameter in the target workspace by clicking **Create `[parameter name]`**.
    - Select an existing parameter in the target workspace under which the values of the parameter from the source workspace will be saved in the cloned object.  
7. If the system automatically mapped the events and attributes, you can either confirm the mapping or you can select the events and parameters.
8. When all events and their parameters (if there are any) are mapped, confirm the mapping settings by clicking **Apply**.  
9. In the upper right corner, click **Clone**.

### Events and attributes created while cloning

#### Events

Events and their parameters created while cloning will be available in the target workspace in **Data Modeling Hub > Events**.


<div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

These events/parameters will only have `name` and `display name` defined. The remaining metadata are empty and the JWT authorization settings for the event are disabled.

</div></div></div>


#### Profile attributes

Profile attributes created while cloning will be available in the target workspace in **Data Modeling Hub > Profile attributes**. The attributes will only have the following metadata:
- `source name`
- `label` 
- the type (string)  
    
  <div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

  The attribute created while cloning is always a string, even if it was a different data type in the original workspace.

  </div></div></div>


### Cloning logs

To check whether the objects were successfully cloned, go to **Settings > Cloning logs**. 