URL parameters are added to the end of a URL to manipulate data that is sent and received by the browser. They are used throughout the NetSuite and NetSuite Commerce applications, and this article will give you pointers on using them.

Marketing Parameters

There are three key URL parameters available for NetSuite customers in relation to marketing activities:

  1. Partner referral ID
  2. Lead source ID
  3. Promotion codes

The benefit of using partner referral and lead source parameters is that you can track the effectiveness of their associated schemes. Both partner referral and lead source generation are formal activities you can set up in NetSuite, and so you can send out links that to your web stores (including pages for products and searches) with those URL parameters attached that. Therefore, if you run an email campaign, for example, you can see for sure, how many people clicked the links in your emails.

An important thing to keep in mind is that these URL parameters can be chained, along with any other URL parameters you may use (such as those required by third-party analytics tools). For example, if you are creating a social media campaign, you may want to use parameters for both lead source and promotions to track where users came from and to give them a discount.

Partner Parameter

If you operate a referral scheme, then you will want to track the performances of your partners. You can track this using the partner URL parameter. Using it creates a cookie on the shopper’s so that all their transactions on the site are marked with the ID of the partner. When they complete an order, it is marked with the partner’s ID so that it is traceable.

To test this, you’ll need to set up a partner. In NetSuite, go to Lists > Relationships > Partner > New. For test purposes, you only need to pay attention to two fields: the Name and Partner Code. As you add a name, the partner code will be automatically generated, but you can override it if you want (eg with something shorter or anonymous, such as a number, code, or organization name).

The New Partner page in NetSuite, showing a freshly created partner called Sally Partnerson

After creating the partner, go to the Marketing tab on the record and click on Referring URL to go to your site. When your site loads, you’ll see that the URL has a parameter and the partner code tacked onto the end. Check in your browser’s developer tools to see if the cookie was created.

An image of the Application > Cookies subtab in the browser developer tools

This cookie lasts a year but the association is permanent, is maintained throughout the life of the shopper’s record.

To continue testing, browse around the site and then place an order. You’ll notice that while the URL parameter is no longer present, the cookie still is — even when you transition to the checkout domain.

After placing the order, look it up in the NetSuite backend: you’ll see that that the partner you just created is associated with the order.

An image of the Sales Information tab in an order record showing the test partner we set up to track web order referrals

You can then use this information to build up reports and track how much your partners are contributing to your sales.

Lead Source Parameter

If you run marketing campaigns for your site then the lead source parameter can be used to track whether they contributed to any sales.

To test this, go to Lists > Marketing > Marketing Campaigns and create a new campaign. Add in a name and ID and save it.

A screenshot of the NetSuite UI showing the creation of a new marketing campaign

This time, go to the frontend of your site and log out. Append the leadsource parameter to the URL with its ID, for example: ?leadsource=newsletter1016. Unlike the other two parameters, no cookie is created and the parameter is removed from the URL as the page loads.

Add an item to your cart and go to check out. Create a new user first, and then place the order. When you go to look up the sales order in NetSuite, you’ll see that the Lead Source field will be populated with the campaign name you just set up.

An image of the Sales Information tab in an order record showing the test lead source we set up to track web order marketing campaign referrals

When the shopper creates a new account through this way, a new lead will be generated. Go to Lists > Relationships > Leads and view the user you just created. As you’ve placed an order, you’ll need to search for customers (rather than leads). Under the Marketing tab, you’ll see the marketing campaign you set up as the Lead Source value.

Like the others, you can report its usage and see how successful a tool it is. Again, also like the others, you can chain this parameter together with the others and track, for example, a marketing campaign targeted at the customers of a partner with a promotion code.

Promotion Code Parameters

We have reference documentation for all of these parameters, so I won’t labor the point.

The promocode parameter can be used with promotions that are triggered by a coupon code. By using the format of ?promocode=YourPromoCode, you can automatically add the promo code to the user’s cart when they visit the URL.

Promo codes can also be reported on, but if you’re tying it with a campaign, you may find more accurate results using reports on the campaign itself, as promo codes may be shared between shoppers, and published on third-party sites.

Language Parameters

A user’s language is determined by the site default (if they are logged out) or whatever is set on their user record (if they are logged in). Widgets can also be used to temporarily change the user’s language.

If your site has more than one language enabled, you can test content in different languages by using the lang parameter. For example, if I want to test what my site looks like in Latin American Spanish, I could append ?lang=es_AR to end of my site’s URL. This can be useful for testing multi-language SMT content, for example.

Note that the languages must be enabled on your site before you can test them, and that the codes themselves are case sensitive. For example, the American English language code is en_US, but en_us is not.

Redirection Parameters

The origin and origin_hash parameters can be used to redirect a user after they have logged in; this might be useful, for example, to send them to a specific location in My Account or back to the page they were looking at before they clicked the Login button.

For more information on these parameters, see Page Navigation and Redirection.