Loading...

Policies for links

Introduction

This article provides instructions on how to set up policies for links. For full instructions on how to build a custom policy, visit:

Create a custom policy.

Custom links policies

This section provides instructions on how to set up policies to find specific links. These are located in the href="" section of the anchor tags on the domain.

To create this policy:

  1. Check the RegEx.
  2. Clear the Case sensitive box.
  3. Enter the following in the Query field and replace the word SEARCH with what you want to find inside the link portion:

    href=("|').*SEARCH.*("|')

    For example:

    href=("|').*foo.*("|')

    The query matches:

    <a href="http://test.com/foo">here</a>
    <a href="http://foo.com/test">click</a>
    <a href="http://test.foo/test">click here</a>

    However, it does not match: 

    <a href="http://test.com/test">foo</a>

    If the policy you need is difficult to create, contact Support for assistance.

Rule operators

  • Starts with: Find any snippet starting with the inserted text.
  • Contains: Find any instances of the inserted text when the text contains a single word.
  • Contains words: Find any instances of the inserted text when the text contains multiple words. Use commas to separate the words.
  • Contains sentence: Find any instances of the inserted sentence or text.
  • Ends with: Find any snippet ending with the inserted text.
  • Equal: Find an exact match for the inserted text or value. For example, “Monsido” - match. “About Monsido” - no match.
  • Regex: Use regular expressions to define what you want to search.

  • Conforms with: Use regular expressions to define the correct structure or form of the inserted value.
  • Less than: Find any results less than the inserted value.
  • Less than or equal: Find any results less than or equal to the inserted value.
  • Greater than: Find any results greater than the inserted value.
  • Greater than or equal: Find any results greater than or equal to the inserted value.
  • (Meta header) Date age greater than: Find meta tags older than the inserted value. Choose the interval that matches the way your meta tag dates are written.
  • (Meta header) Date age less than: Find meta tags younger than the inserted value. Choose the interval that matches the way your meta tag dates are written.
  • CSS selector: Find the inserted CSS selector.

Rules

  • Page HTML: Search for text in the entire domains html.
  • Page URL: Set a rule for internal page URLs.
  • Text: Search for text excluding CSS and HTML tags.
  • Page title: Search for text in the page title where the title is not the header.
  • Page title length: Define when the rule must apply for the title.
  • Heading text: Search for text in headers (h1,h2,h3,h4,h5,h6).
  • Heading text length: Define when the rule must apply for header texts.
  • Meta header: Search for meta header tags that match the query.
  • Meta header length: Define when the rule must apply for meta headers.
  • Link text length: Define when the rule must apply for link texts.
  • External link count: Define when the rule must apply for external links.
  • File size: Search for files across selected domains.
  • Image size: Search for images across selected domains.
  • Image text: Search for images with this name.
  • Image text length: Define when the rule must apply for image texts.
  • Readability level: Search for text that is in compliance with a school degree.

Additional resources

For full instructions on how to build a custom policy, visit:

Create a custom policy.

For documentation and advanced help files including SDK information for developers, visit Acquia Optimize for Developers.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation