Skip to main content
All CollectionsCollectWebsite Overlay Channel
Adding Multiple Surveys in Google Tag Manager
Adding Multiple Surveys in Google Tag Manager

Zenloop Widget - Multi Language Option

L
Written by Lisa Rentrop
Updated over 2 years ago

Step 1 - Variable: URL fraction

For extracting the country out of your page URL you need to look for the URL structure.

Your standard URL is: www.yoursite.com/page1?gclid=aabbcc123#home for English.

The main options for switching to a german language are the following:

1. Create a new variable

2. Name the variable (e.g. Page URL)

3. Select variable type: URL

4. Select component type based on your site country structure (bold)

  1. www.yoursite.de/page1?gclid=aabbcc123#home -> Host

  2. www.yoursite.com/de/page1?gclid=aabbcc123#home -> Page path

  3. de.yoursite.com/page1?gclid=aabbcc123#home -> Host

  4. www.yoursite.com/page1?hl=de&gclid=aabbcc123#home -> Query parameters

5. Select component type based on your site country structure

6. Example Configuration

Step 2 - Variable: Country extraction

After you extracted the needed URL fragment, the next step is to extract the language which was selected by the user (or which is selected by default). Therefore, we use a RegEx table, but only use one row. Keep in mind to set your default language as the default option.

1. Create a new variable

2. Name the variable (e.g. Page Country)

3. Select variable type: RegEx Table

4. Select your new variable (Page URL) as your input variable

5. Add a new row to the RegEx Table

6. Based on your country structure pick the following pattern:

7. Example Configuration

Step 3 - Variable: Providing Hash ID

In the last step we set the HashID for providing the right zenloop widget based on the language. Therefore we use the extracted language from the step before as the input value for the lookup table.

1. Create a new variable

2. Name the variable (e.g. Zenloop HashID by language)

3. Select variable type: Lookup Table

4. Select your RegEx based language detection variable from the last step as you input variable (Page Language)

5. For every language on your site (except the default language) you need to fill one row with the language key represented in your URL as input and the corresponding hash id for providing the correct zenloop widget

6. Use the HashID of your default language as default value

7. Example configuration

Did this answer your question?