Why doesn't Engage add Group Parameters in the expected place in a link when the link contains a # symbol?
    • 1 Minute to read
    • Dark
      Light

    Why doesn't Engage add Group Parameters in the expected place in a link when the link contains a # symbol?

    • Dark
      Light

    Article summary

    Engage allows you to set up Link Parameters in the Group settings, which will automatically add these parameters to all links in a given message sent using that group.

    Sometimes, the parameters may not be added in the position you expect in the link.

    When you add a hyperlink to a message, you can add parameters that insert information into the URL. Link Parameters set values for common web analytics platforms, allowing your site analytics to gather information about the clicker. Once received, Mapp Engage transmits the link parameter to a web analytics tool or e-commerce system.

    More details on Link Parameters can be found here.

    Example

    Let’s look at this example: http://example.com/#/lorem/ipsum

    Here the link, technically called a Universal Resource Indicator or URI, is composed of 2 parts: A Universal Resource Locator or URL and a Fragment:

    • URL: http://example.com/

    • Fragment: #/lorem/ipsum

    If your Link Parameters are set to add the following 3 parameters and values:

    • utm_source=mapp

    • utm_medium=newsletter

    • utm_campaign=kb

    Given that these Link Parameters are added to the end of each link, you may not see the link you expect:

    Expectation

    http://example.com/#/lorem/ipsum?utm_source=mapp&utm_medium=newsletter&utm_campaign=kb

    Reality

    http://example.com/?utm_source=mapp&utm_medium=newsletter&utm_campaign=kb#/lorem/ipsum

    Explanation

    The URI format is defined by the RFC-3986 standard. Section 3, Syntax Components explains the general format of a URL, noting that the Path and Query Parameters precede the Fragment. Section 3.5, Fragment notes that the Fragment starts at the # symbol and continues to the end of the URL.

    This means any parameters in a link must be added before any fragment.

    Conclusion

    Engage is generating a standards-compliant URI by inserting the query parameters from the group’s defined Link Parameters at the end of the URL part "http://example.com/" but before and before the fragment part "#/lorem/ipsum" because the fragment is defined to end the URL, and any parameters must come before it.

    As this URI is standards-compliant, any tracking application or server reading these parameters from the URL part of the URI should not have any issues.

    Document Technical Reference: h6y48


    Was this article helpful?


    What's Next