How can we help you?

Full-Page Script

Last updated on March 25, 2024

This script allows you to shorten all (or select) URLs on your website very easily. All you need to do is to copy and paste the code below at the end of your page. You can customize the selector as you wish to target URLs in a specific selector. Note you can just copy the code below because everything is already for you.

View code

Choosing a different domain

By default, the script uses the default domain on the platform however you can define a custom domain name to shorten links with. You need to make sure the domain is exactly the same as the domain added in the account, including the schema (http/https

Choosing custom selectors

By default, this script shortens all URLs in a page. If you want to target specific URLs then you can add a selector parameter. You can see an example below where the script will only shorten URLs having a class named mylink or all direct link in the .content container or all links in the .comments container

Excluding domain names

You can exclude domain names if you wish. You can add an exclude parameter to exclude domain names. The example below shortens all URLs but excludes URLs from google.com or apple.com

Restricting domain names

You can restrict domain names by adding an include parameter to restrict domain names. The example below shortens all URLs within the include domain name.

Read Full-Page Script

Did not answer your question?
Contact us