Skip to main content

Rule box category Edit URL

Learn how to edit URLs in your data using the Edit URL rule box category in Productsup.

Introduction

The category Edit URL contains all rule boxes that can help you edit your URLs. For example, you can change link parameters, add URL fragments, shorten, decode, and encode URLs. You can also skip products if their current value isn't a URL.

edit_url.png

You can use the following rule boxes to edit URLs:

Add / Change Link Parameter

URL parameters represent a key and a value separated by an equals sign (=) and joined to the rest of the URL by an ampersand (&) or a question mark (?). You can add or change URL parameters in bulk in Productsup. For example, if you need to deal with tracking parameters that pass information about clicking behavior.

The Add / Change Link Parameter rule box lets you add a static parameter to all the URLs in one attribute. Alternatively, you can add individual dynamic parameters to your URLs from another attribute in your site.

  1. Take the steps from Add a rule box to add the Add / Change Link Parameter rule box.

    Add/change Link Parameter
  2. Enter the name of your parameter in Parameter Name.

  3. If you want to add a static parameter value, enter it in Value. If you want to add a dynamic parameter value, choose the attribute that contains your dynamic parameter values in the Column drop-down menu.

  4. Select Save.

For example, you have the following values in the URL attribute and want to add the utm_campaign parameter with the value winter_sale to all links that don't have it yet. If a link contains that URL parameter already, you want to ensure its value is winter_sale. You can achieve this with the following setup of the Add / Change Link Parameter rule box:

Parameter Name: utm_campaign, Value: winter_sale

URL (before)

URL (after)

https://www.amazon.com/Fluffy-Pajama-Pants-Green/dp/G00PJSF1UF

https://www.amazon.com/Fluffy-Pajama-Pants-Green/dp/G00PJSF1UF?utm_campaign=winter_sale

https://www.amazon.com/Warm-Wool-Socks-Red/dp/R00SCKS1WO?currency=EUR&utm_medium=product_sync&utm_source=google&utm_campaign=search_organic

https://www.amazon.com/Warm-Wool-Socks-Red/dp/R00SCKS1WO?currency=EUR&utm_medium=product_sync&utm_source=google&utm_campaign=winter_sale

Add Column URL-Encoded

The Add Column URL-Encoded rule box encodes a URL from another attribute and adds this encoded version to your current attribute.

  1. Take the steps from Add a rule box to add the Add Column URL-Encoded rule box.

    Add Column URL-Encoded
  2. In the Column drop-down list, select an attribute with the link you wish to encode and add to the current attribute.

  3. In Mode, select where you want to add the URLs of the chosen attribute within the current values:

    1. append adds the string at the end of the current value.

    2. prepend adds the string at the beginning of the current value.

  4. Select Save.

For example, you have the following values in the images attribute. Your export channel requires receiving all image links in one attribute and expects them to be encoded. You can achieve this with the Add Column URL-Encoded rule box by selecting the attribute containing the needed image links in Column and choosing append in Mode:

images (before)

images (after)

https%3A%2F%2Fwww.your-store.com%2Fimages%2Fwhite-socks-1.jpg%E2%80%8B

https%3A%2F%2Fwww.your-store.com%2Fimages%2Fwhite-socks-1.jpg%E2%80%8Bhttps%3A%2F%2Fwww.your-store.com%2Fimages%2Fwhite-socks-2.jpg%E2%80%8B

https%3A%2F%2Fwww.your-store.com%2Fimages%2Fblack-socks-1.jpg%E2%80%8B

https%3A%2F%2Fwww.your-store.com%2Fimages%2Fblack-socks-1.jpg%E2%80%8Bhttps%3A%2F%2Fwww.your-store.com%2Fimages%2Fblack-socks-2.jpg%E2%80%8B

Note

To add multiple image links in this use case, you can apply multiple Add Column URL-Encoded rule boxes to the images attribute.

Add URL Fragment

A URL fragment is an internal page reference that appears at the end of a URL and begins with a hash character (#) followed by an identifier. It refers to a section within a web page.

The Add URL Fragment rule box lets you add a static fragment at the end of all URLs in a current attribute:

  1. Take the steps from Add a rule box to add the Add URL Fragment rule box.

    Fragment URL
  2. Enter a desired fragment in Fragment (without #).

  3. Select Save.

For example, you have the following values in the URL attribute and want to add the #section-1 fragment to all links. You can achieve this with the Add URL Fragment rule box by entering section-1 in Fragment (without #):

URL (before)

URL (after)

https://www.amazon.com/Fluffy-Pajama-Pants-Green/dp/G00PJSF1UF

https://www.amazon.com/Fluffy-Pajama-Pants-Green/dp/G00PJSF1UF#section-1

https://www.amazon.com/Warm-Wool-Socks-Red/dp/R00SCKS1WO?currency=EUR&utm_medium=product_sync&utm_source=google&utm_campaign=search_organic

https://www.amazon.com/Warm-Wool-Socks-Red/dp/R00SCKS1WO?currency=EUR&utm_medium=product_sync&utm_source=google&utm_campaign=search_organic#section-1

Get Filename from URL

The Get Filename from URL rule box lets you extract a file name and extension from a URL.

  1. Take the steps from Add a rule box to add the Get Filename from URL rule box.

    get_filename_from_url.png
  2. Select Save.

For example, you have the following values in the file attribute and want only the file name and extension to stay in the attribute. You can achieve this with the Get Filename from URL rule box:

file (before)

file (after)

http://example.com/path/to/filename.csv

filename.csv

http://website.org/import-files/file-name.xml

file-name.xml

Raw URL Encode

The Raw URL Encode rule box lets you encode raw URLs, which means changing space characters to %20 and replacing all non-alphanumeric characters except for -, _, ., and ~ with a percent sign (%) followed by two hex digits.

  1. Take the steps from Add a rule box to add the Raw URL Encode rule box.

    raw_url_encode.png
  2. Select Save.

For example, you have the following values in the image_link attribute and want to encode them. If there are any spaces in the values, you want to change them to %20. You can achieve this with the Raw URL Encode rule box:

image_link (before)

image_link (after)

https://www.your-store.com/images/white-socks-1?utm_campaign=google_play~

https%3A%2F%2Fwww.your-store.com%2Fimages%2Fwhite-socks-1%3Futm_campaign%3Dgoogle_play%E2%80%8B~

https://www.your-store.com/images/black-socks-1

Note

There is a space at the end of the URL.

https%3A%2F%2Fwww.your-store.com%2Fimages%2Fblack-socks-1%20

https://www.your-store.com/images/black-socks-2

https%3A%2F%2Fwww.your-store.com%2Fimages%2Fblack-socks-2

Tip

Compare the results of applying the Raw URL Encode rule box to the URL Encode rule box. See URL Encode.

Shorten Url

The Shorten Url rule box shortens URLs to meet the length restrictions set by specific export channels.

Warning

Applying the Shorten Url rule box changes URL domains to url.productsup.com.

  1. Take the steps from Add a rule box to add the Shorten Url rule box.

    shorten_url.png
  2. Select Save.

For example, you have the following values in the URL attribute and want to reduce the length of all URLs. You can achieve this with the Shorten Url rule box:

URL (before)

URL (after)

https://www.amazon.de/Fluffy-Plush-Blanket-Wool-Double-Sided-Microfiber/dp/B080FPBWD2/ref=asc_df_B080FPBWD2/?tag=googshopus-21&linkCode=df0&hvadid=309905679568&hvpos=&hvnetw=g

http://url.productsup.com/1096338/c/515570/0lf01b88d8188c2ce98a0131e51d5bc6

http://website.org/import-files/image.jpg

http://url.productsup.com/1096338/c/515570/520269e04380cdf18607b17d239k3424

Skip Row If Isnt URL

The Skip Row If Isnt URL rule box lets you exclude products from export if the current attribute is missing a valid URL.

  1. Take steps from Add a rule box to add the Skip Row If Match rule box.

    Skip Row If Isn't URL
  2. Optionally, in Skip Priority, set the priority if you have several rule boxes with different priorities.

  3. Select Save.

For example, you have the following values in the image_link attribute and want to export only the products that have a valid URL in this attribute. You can achieve this with the Skip Row If Isnt URL rule box:

image_link (before)

image_link (after)

https://www.your-store.com/images/white-socks-1.jpg

https://www.your-store.com/images/white-socks-1.jpg

https://www.your-store.com/images/black-socks-1.jpg

Note

There is a space at the end of the URL.

https://www.your-store.com/images/black-socks-1.jpg

https://www.your-store.com/images/black-socks-2.jpg

https://www.your-store.com/images/black-socks-2.jpg

This rule box doesn't change the data in your attribute. It only skips products during export if they don't contain a valid URL. To let you know which products the rule box excludes during export, it highlights entire product rows in red, not just the attribute where you applied the rule box.

URL Decode

The URL Decode rule box converts percent-encoded URLs into a regular URL format, which means changing plus signs (+) to spaces and replacing percent signs (%) followed by two hex digits with the respective non-alphanumeric characters.

The URL Decode rule box does the opposite of what the Raw URL Encode and URL Encode rule boxes do.

  1. Take the steps from Add a rule box to add the URL Decode rule box.

    url_decode.png
  2. Select Save.

For example, you have the following values in the image_link attribute and want to convert them to a regular URL format. You can achieve this with the URL Decode rule box:

image_link (before)

image_link (after)

https%3A%2F%2Fwww.your-store.com%2Fimages%2Fwhite-socks-1%3Futm_campaign%3Dgoogle_play%E2%80%8B%7E

https://www.your-store.com/images/white-socks-1?utm_campaign=google_play~

https%3A%2F%2Fwww.your-store.com%2Fimages%2Fblack-socks-1+

https://www.your-store.com/images/black-socks-1

Note

There is a space at the end of the URL.

https%3A%2F%2Fwww.your-store.com%2Fimages%2Fblack-socks-2%20

https://www.your-store.com/images/black-socks-2

Note

There is a space at the end of the URL.

URL Encode

The URL Encode rule box lets you percent-encode URLs, which means changing spaces to plus signs (+) and replacing all non-alphanumeric characters except for -, _, and . with a percent sign (%) followed by two hex digits.

  1. Take the steps from Add a rule box to add the URL Encode rule box.

    url_encode.png
  2. Select Save.

For example, you have the following values in the image_link attribute and want to percent-encode them. If there are any spaces in the values, you want to change them to plus signs. You can achieve this with the URL Encode rule box:

image_link (before)

image_link (after)

https://www.your-store.com/images/white-socks-1?utm_campaign=google_play~

https%3A%2F%2Fwww.your-store.com%2Fimages%2Fwhite-socks-1%3Futm_campaign%3Dgoogle_play%E2%80%8B%7E

https://www.your-store.com/images/black-socks-1

Note

There is a space at the end of the URL.

https%3A%2F%2Fwww.your-store.com%2Fimages%2Fblack-socks-1+

https://www.your-store.com/images/black-socks-2

https%3A%2F%2Fwww.your-store.com%2Fimages%2Fblack-socks-2

Tip

Compare the results of applying the URL Encode rule box to the Raw URL Encode rule box. See Raw URL Encode.