Follow email Print print

Deep Link: How to Build and Encode URL with Custom Data and Call Back URL

The purpose of this document is to provide a step-by-step process for building out a deep link that contains custom parameters. This document is complimentary to Deep Linking: Add Custom Values for Reporting and a Call Back URL.


We’ll use the following deep link as an example for this document:





Terminology used in this document

Base URL / Path: gospotcheck://companies/{id}/missions/{id}/places/{id}/mission_responses/?start=true

Keys:customer_data=, completion_trigger=

Values: Anything encapsulated by curly brackets ( { } )


Step 1: Build Out Each Query Parameter in JSON

Build out each query parameter separately.

From the example above, we would build out the customer_data and the completion_trigger values in JSON.


Step 2: Validate the JSON within the Query Parameter

Any values associated with the customer_data and completion_trigger keys need to be properly formatted JSON. If they are not, the MarketX system will not accept the values.

You can validate that the JSON is correctly formatted with any online JSON formatting tool


  • Remove any new lines and / or empty spaces to help reduce the number of overall characters

From the example above, we are validating that




are properly formatted JSON. The remainder of the URL stays the same.

If the JSON is not properly formatted, the MarketX system will not store the values.


Step 3: Encode Each Query Parameter Separately

Once the JSON is validated for each Query Parameter, it will need to be encoded. You can use any online tool, including this one .

You will encode everything within, and including, the curly brackets around each JSON object.

From the example above, we are encoding the following:


and, separately;




Do NOT encode the base url / path or query parameters separators (“?”,”&”, etc.). If any keys contains non alphanumeric or reserved characters, it must be encoded as well. All JSON values of the keys need to be encoded.


Step 5: Build the Fully Encoded Deep Link

You are now ready to build out the full deep link.

Start with the base URL / path:



You will then add your first Query Parameter. In our example this is the customer_data key:



Add the associated encoded values after the key:



Add your second Query Parameter. In our example this is the completion_trigger key:



Add the associated encoded values after the key:



You now have a completed, encoded deep link! This link is what you will embed wherever the deep link is triggered.




Have more questions? Submit a request