Personalize Your Campaigns With Smart Tags
A Smart Tag is a compact snippet of code that, when utilized within our compatible plugins, provides valuable insights into various aspects of your WordPress site.
Identifiable by its curly brackets and the descriptive term(s) enclosed within them, a Smart Tag appears in the following format: {fpf smart_tag}.
The following Smart Tags can be categorized based on the data they represent.
- Page Smart Tags
- Visitor Smart Tags
- Date/Time Smart Tags
- Site Smart Tags
- User Smart Tags
- Geolocation Smart Tags
- FireBox Campaign Smart Tags
- FireBox Form Smart Tags
- Easy Digital Downloads Smart Tags
- WooCommerce Smart Tags
- Utility Smart Tags
Page Smart Tags
With Page Smart Tags, you can capture various data related to the current page.
{fpf url}
This smart tag provides the complete URL of the current page.
{fpf url.path}
This smart tag provides the base URL of your site.
{fpf url.encoded}
This smart tag provides the current page's URL in an encoded format.
{fpf page.title}
This smart tag provides the current post/page title.
{fpf page.lang}
This smart tag provides the language code for the current site, in the format: "en-US".
{fpf page.langurl}
This smart tag provides the language URL code for the current site, in the format: "en".
{fpf page.browsertitle}
This smart tag provides the current browser title.
{fpf querystring.KEY}
This smart tag provides access to query string that are available in the URL of the page.
For example, let's say the URL is https://example.com/contact?plugin=FireBox and you want to retrieve the value of query string plugin, you'll be able to do so using the querystring Smart Tag: {fpf querystring.plugin}.
Visitor Smart Tags
With Visitor Smart Tags, you can capture various data related to the current visitor.
{fpf ip}
This smart tag provides the IP of the visitor.
{fpf client.device}
This smart tag provides the device (desktop, tablet, mobile) of the visitor.
{fpf client.browser}
This smart tag provides the browser name used by the visitor.
{fpf client.os}
This smart tag provides the operating system name used by the visitor.
{fpf client.useragent}
This smart tag provides the user agent used by the visitor's browser. The user agent is a piece of information about the user's system.
{fpf referrer}
This smart tag provides the referrer URL of the visitor.
Date/Time Smart Tags
With Date/Time Smart Tags, you can capture various data related to the current date and time.
{fpf date}
This smart tag provides the current date and time in the format Y-m-d H:i:s
This Smart Tag supports the following options to customize it further. Let's see them one by one:--format
Use this option to change the format of the date according to the PHP formatting options
Syntax
{fpf date --format=Y-m-d}
{fpf time}
This smart tag provides the current time in the format H:i
{fpf day}
This smart tag provides the current day of the month, without leading zeros.
{fpf month}
This smart tag provides the current month of the year, without leading zeros.
{fpf year}
This smart tag provides the current year.
Site Smart Tags
With Site Smart Tags, you can capture various data related to the site's information.
{fpf site.email}
This smart tag provides the current site email address set under Settings > General.
{fpf site.name}
This smart tag provides the current site name set under Settings > General.
{fpf site.url}
This smart tag provides the current site address URL set under Settings > General.
User Smart Tags
With User Smart Tags, you can capture various data related to the currently logged-in user.
{fpf user.name}
This smart tag provides the name of the logged in user. If the user isn't logged in then this smart tag will return nothing.
{fpf user.firstname}
This smart tag allows you to retrieve a user's first name. If the user isn't logged in then this smart tag will return nothing.
{fpf user.lastname}
This smart tag allows you to retrieve a user's last name. If the user isn't logged in then this smart tag will return nothing.
{fpf user.login}
This smart tag provides the username of the logged in user. If the user isn't logged in then this smart tag will return nothing.
{fpf user.registerdate}
This smart tag provides the registration date of the logged in user. If the user isn't logged in then this smart tag will return nothing.
{fpf user.email}
This smart tag provides the email address of the logged in user. If the user isn't logged in then this smart tag will return nothing.
{fpf user.KEY}
This smart tag allows you to retrieve a user's property value. If the user isn't logged in then this smart tag will return nothing.
Geolocation Smart Tags
These Smart Tags provide details about the visitor's actual whereabouts, requiring the activation of Geolocation features for them to function properly.
{fpf geo.country}
Provides the name of the visitor's country, for example, Greece.
{fpf geo.countrycode}
Provides the visitor's country code, for instance, GR.
{fpf geo.city}
Provides the visitor's city name. Eg: Athens
{fpf geo.region}
Provides the visitor's region.
{fpf geo.location}
Provides the visitor's geolocation (Country, City, Region).
FireBox Campaign Smart Tags
{fpf fb.id}
This smart tag provides the current campaign ID.
{fpf fb.title}
This smart tag provides the current campaign title.
FireBox Form Smart Tags
{field.email}
This smart tag provides the email of the freshly captured Lead by your FireBox Form.
How to use: You could use {field.email} to set up an email notification towards the same submission, informing them that they have just submitted your FireBox Form and any message you want to convey.
{field.FIELD_NAME}
As you can see, this smart tag is a wildcard. The part "FIELD_NAME" needs to be replaced by any form field > Field Name value you have set up in your FireBox Form.
How to use: A good example of this special smart tag is when you have a field to get the Age of the submission and you have called it "age" through your FireBox Form. In that case, to get the Field's Age (Field Name = age) value of the submission you will need to use the smart tag {fpf field.age}
This Smart Tag supports the following options to customize it further.
--layout
The layout option allows you to overwrite the output of the Smart Tag and even include HTML to have a more personalized output. You can use %value% to print the actual value of the field. If the field has no value, then the output will be blank. Example:
{fpf field.FIELD_NAME --layout=Name: %value%}
Dropdown and Radio fields specific Smart Tags
You can use the following Smart Tag to retrieve the label of the selected value of a dropdown/radio field:
{fpf field.FIELD_NAME.label}
{fpf all_fields}
This Smart Tag outputs all the submitted information from your form fields in the following HTML layout:
<div><strong>Name</strong>: John Doe</div>
<div><strong>Email Address</strong>: [email protected]</div>
<div><strong>Comments</strong>: This is a test message</div>
Because of this, it can be used in Email Notifications or Message After Success to get a complete picture of all the fields filled out by the particular submission.
This Smart Tag supports the following options to customize it further. Let's see them one by one:
--hideLabels
Use this option if you don't want to include the field labels in the output.
Syntax:
{fpf all_fields --hideLabels=true}
--excludeEmpty
Your form may include optional fields that are very likely to have no value. Use this option to exclude those fields from the output.
Syntax
{fpf all_fields --excludeEmpty=true}
--excludeFields
By default, all fields will be included in the output. Use this option to exclude certain fields by their name separated by a comma. For instance, the example below will exclude text1 and dropdown2 fields from the output.
Syntax
{fpf all_fields --excludeFields=text1,dropdown2}
--excludeTypes
By default, all fields will be included in the output. Use this option to exclude certain fields by their type separated by a comma. For instance, the example below will exclude all Hidden fields from the ouput.
Syntax
{fpf all_fields --excludeTypes=hidden}
Combining options
You can also combine multiple options in the same shortcode. For instance, the example below will output only the fields that have a value and exclude all hidden fields.
{fpf all_fields --excludeEmpty=true --excludeTypes=hidden}
Easy Digital Downloads Smart Tags
{fpf edd.cart.total}
This smart tag provides the Easy Digital Downloads cart total.
It also accepts a --min=XX option, allowing you to define the minimum required cart total that must be met. i.e. if you need $50 to show a coupon code, as the user continues shopping, the Smart Tag will update to reflect this change.
While using the --min=XX option, you may utilize the --filter=percentage option in your Smart Tag to return the percentage required to achieve the minimum requirement.
{fpf edd.cart.subtotal}
This smart tag provides the Easy Digital Downloads cart sub total.
It also accepts a --min=XX option, allowing you to define the minimum required cart subtotal that must be met. i.e. if you need $25 subtotal minimum to offer free shipping, as the user continues shopping, the Smart Tag will update to reflect this change.
While using the --min=XX option, you may utilize the --filter=percentage option in your Smart Tag to return the percentage required to achieve the minimum requirement.
{fpf edd.cart.count}
This smart tag provides the Easy Digital Downloads total cart items count.
It also accepts a --min=XX option, allowing you to define the minimum required cart items count that must be met. i.e. if you need 3 total cart items minimum to offer a freebie, as the user continues shopping, the Smart Tag will update to reflect this change.
{fpf edd.stock}
This smart tag provides the stock of an Easy Digital Downloads product. This works with the Purchase Limit plugin provided by Easy Digital Downloads.
It also accepts a --product=XX option, allowing you to define for which product to retrieve its stock.
WooCommerce Smart Tags
{fpf woo.cart.total}
This smart tag provides the WooCommerce cart total.
It also accepts a --min=XX option, allowing you to define the minimum required cart total that must be met. i.e. if you need $50 to show a coupon code, as the user continues shopping, the Smart Tag will update to reflect this change.
While using the --min=XX option, you may utilize the --filter=percentage option in your Smart Tag to return the percentage required to achieve the minimum requirement.
{fpf woo.cart.subtotal}
This smart tag provides the WooCommerce cart sub total.
It also accepts a --min=XX option, allowing you to define the minimum required cart subtotal that must be met. i.e. if you need $25 subtotal minimum to offer free shipping, as the user continues shopping, the Smart Tag will update to reflect this change.
While using the --min=XX option, you may utilize the --filter=percentage option in your Smart Tag to return the percentage required to achieve the minimum requirement.
{fpf woo.cart.count}
This smart tag provides the WooCommerce total cart items count.
It also accepts a --min=XX option, allowing you to define the minimum required cart items count that must be met. i.e. if you need 3 total cart items minimum to offer a freebie, as the user continues shopping, the Smart Tag will update to reflect this change.
{fpf woo.stock}
This smart tag provides a WooCommerce product stock.
It also accepts a --product=XX option, allowing you to define for which product to retrieve its stock.
Utility Smart Tags
With Utility Smart Tags, you can capture various data related to utility.
{fpf randomid}
This smart tag provides a random hexadecimal number with a length of 8 alphanumeric characters.
{fpf cookie.COOKIE_NAME}
Returns the value of a cookie as stored in the visitor’s browser. Replace COOKIE_NAME with the name of the cookie.
{fpf post.NAME}
Retrieves the value of a post data from the $_POST superglobal array. For instance, when submitting a form with "email" and "name" input fields, you can utilize {post.email} and {post.name} Smart Tags within the submitted URL to obtain the values of respective form inputs.