# How to Use Smart Tags

Popupsmart provides an easy way to display customized text in your popup campaigns using the Smart Tags feature. Create personalized onsite marketing campaigns with dynamic content to improve conversions.

# What Are Smart Tags?

Smart tags make it possible to add dynamic text to your popup campaigns. For example, you can address visitors by their names or show their location automatically using a specifically formatted placeholder text.

# Add a Smart Tag to Your Campaign

# 1. Edit a text element in the popup builder

smart tag edit area

# 2. Copy-paste or write a predefined/custom smart tag in curly braces; e.g., {{name}}

how smart tags work

# 3. Optionally, define the default value to use for the Smart Tag if the tag can’t find the necessary data. For example: Hello, {{name|fall=there}}

no match smart tag

# 4. Save Changes when you’ve finished editing.

# 5. Once the popup is live and published, the Smart Tag will be shown as the dynamic value you have set.

smart tag working

# How Smart Tags Work

Popupsmart’s Smart Tags feature works in a campaign’s headline, description, sub-description, input fields, and also for success and teaser popups. Additionally, smart tags can be added to the hidden input fields for purposes like collecting data.

You can feed the Smart Tag data in two different ways; JavaScript API and URL parameter.

URL parameter fills in the data when it is, for example,” examplewebsite.com/?name=erica”.

On the other hand, JavaScript API functions as “psMetaData.add({name: ‘erica’})”

Note that you need to select “Window Loaded” from Triggering when creating the tag in the Google Tag Manager.

gtag add meta smart tag

Apart from these, smart tags can be fed with the data coming from system fields, which are automatically created by browsers.

# Smart Tag Format

Every smart tag must start and end with two curly braces. This determines the text you want to replace inside your popup campaign.

The first value needs to be either a predefined smart tag or the name of a custom variable you have defined.

{{SMART_TAG_NAME}}

To show a default text in case the smart tag cannot pull necessary data, use a pipe character (|) and “fall=” followed by the text you want to use.

{{SMART_TAG_NAME|fall=DEFAULT_TEXT}}

# Predefined Smart Tags

The following are predefined smart tags available to use. The text following a colon ( : ) is for exemplary purposes of how the dynamic content will look.

{{ip”: “3.23.78.141}},
{{date_MM_dd_yyyy}}: “03/05/2021",
{{date_MMMM_dd}}: “May 03",
{{date_dddd_dd_MMMM_yyyy}}: “Monday, 03 May 2021",
{{country}}: “United States”,
{{region}}: “Ohio”,
{{city}}: “Ohio”,
{{countryCode}}: “US”,
{{language}}: “Turkish”,
{{os}}: “Mac OS X 10.15",
{{browser}}: “Chrome 90.0",
{{referrer}}: “”,
{{utmCampaign}}: “”,
{{utmSource}}: “”,
{{utmMedium}}: “”,
{{utmContent}}: “”
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Note: These tag names are reserved names (e.g., {{language}}) and should not change.