How to Target Visitors With a Specific Anchor Tag

OptinMonster makes it easy to show your campaigns only to visitors with a specific anchor tag. Use the guide below to set up the anchor tag display rule for your campaigns.

In this article, you’ll learn how to target a campaign to an anchor tag.

Before You Start

Here are some things to know before you begin:

  • Anchor tag targeting is available with a Pro or higher subscription.
  • An “anchor tag” is the part of a URL that follows a ‘#’ symbol. Anchor tags can be used to link a visitor to a specific part of your webpage, like a heading in the middle of the page. For example, in the URL ‘https://www.domain.com/page#heading’ the anchor tag is ‘heading’.
  • You can include or exclude a campaign from showing based on whether a specific anchor tag is present, or if it matches a pattern using RegEx.

Add Anchor Tag Rule

When you’re using anchor tags on your site, you can easily direct visitors to a specific place on a page, or trigger an OptinMonster campaign.

To target your campaign to a specific anchor tag, follow these steps:

  1. Navigate to the Display Rules view in the campaign builder.
    Display Rules view in the OptinMonster campaign builder
  2. When adding a new rule, select Anchor Tag Targeting from the Targeting menu.
  3. Next, choose how you would like to target your anchor tag. The following options are available for Anchor Tag targeting:

    • exactly matches
    • does not exactly match
    • contains
    • does not contain
    • starts with
    • does not start with
    • ends with
    • does not end with
    • is empty
    • is not empty
    • matches the pattern
  4. Once you’ve selected the specific option you would like to use, type the anchor tag to be targeted in the third box.
  5. When you are finished, click Save.