Short Link Management

更新时间:
复制 MD 格式

Quick Audience converts long URLs into short links to reduce SMS character count and track user clicks.

1. Basic concepts

Overview

Quick Audience converts long URLs into short links to reduce SMS billing character count. It supports short link conversion in text messages, digital messages, and card messages. Recipients see the short link, and clicking it redirects them to the original long URL.

Usage notes

  • The domain name in the original long link must be purchased from a domain name provider and have a completed ICP filing.

  • Activate Short Message Service or Lingyang SuperSMS to use the short link service.

  • Before creating a short link, set a short domain name in Organization Management > Organization Settings.

  • Quick Audience can track clicks for short links that include short parameters. Clicks for short links without short parameters cannot be tracked.

  • When you create a short link, the original address can contain only one long link.

  • When you create an SMS template, you can add multiple existing short links.

Terms

Term

Definition

Example

Short link for Full QA

A short link consists of a protocol, a short domain name, a short path, and short parameters, connected by separators.

Protocol: HTTP or HTTPS

Short domain name: quicka.aliyun.com

Short link: rksqdc

Short parameter: wertxv

https://quicka.aliyun.com/rksqdc?ph=wertxv

QA short link without parameters

1. A short link without short parameters. It has a one-to-one mapping with the long link but cannot identify which phone number received it.

2. Detailed click data cannot be collected and is not queryable in Quick Audience.

https://quicka.aliyun.com/rksqdc

Quick Audience short link with short parameters

1. Detailed click data can be collected for this link.

2. Short parameters create a one-to-one mapping for each user, allowing you to determine whether each phone number clicked the link.

https://quicka.aliyun.com/rksqdc?ph=wertxv

In this example, `?ph=wertxv` is the short parameter.

QA: Short Link Clicks

When a user clicks a Quick Audience short link, the data collected depends on whether the link has short parameters:

  • If the link does not have short parameters, detailed click data cannot be collected, and the number of clicks cannot be tracked.

  • If the link has short parameters, detailed click data can be collected, and the number of clicks can be tracked.

-

Original long link

Examples include Taobao store pages, product detail pages, and WeChat mini program URLs.

The original link is typically long and needs to be converted into a short link for SMS delivery.

If SMS length is not a concern and you do not need Quick Audience to record click data, you can send the long link directly without using a short link.

https://detail.tmall.com/item.htm?id=599804260889

WeChat mini program

H5 link generation

1. The TICKET is about 40 characters long, making the total length about one text message.

2. The customer needs to call an API in the mini program to generate the full URL for the corresponding module page. The `access_token` and `path` parameters must be passed to generate the URL.

3. WeChat mini program short link generation document:

https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/qrcode-link/url-link/generateUrlLink.html

https://wxaurl.cn/*TICKET*

or

https://wxmpurl.cn/*TICKET*

2. How to configure a short domain name

Configure a short domain name to shorten the generated links.

Configure a short domain name with a custom domain name

In Organization Management, go to Organization Settings. On the short domain name configuration page, configure the domain name address and scope. Use a short domain name to reduce the character count of SMS links.

image

Domain forwarding configuration (Development Reference)

After a business user enters the domain name in Quick Audience, a backend developer must configure domain forwarding with redirection rules.

A business user enters a domain name, for example, https://abc.cn/ (example).

Domain name for QA acceptance and forwarding:

https://quicka.aliyun.com/ (Zhangbei)

https://quicka-shanghai.aliyun.com/ (Shanghai)

The generated short link is https://abc.cn/e8as9x, and the short parameter is dbfhjs.

The link the user actually receives is: https://abc.cn/e8as9x?ph=dbfhjs

When the user clicks the link, the request is sent to the server hosting the https://abc.cn/ domain.

Developer requirement: Forward requests to the QA domain name. Forwarding rule:

https://abc.cn/e8as9x?ph=dbfhjs -> https://quicka.aliyun.com/e8as9x?ph=dbfhjs

You can configure domain forwarding by using one of the following methods.

Configure forwarding with Nginx

You can use the return or rewrite directives to redirect links to Quick Audience.

# In the code below, the listen directive indicates that the server block is used for HTTP traffic.
# The server_name directive matches requests that contain the domain name 'www.abc.com'.
# The return directive tells Nginx to stop processing the request and immediately return a 302 code
# and the specified rewritten URL to the client.
# $scheme is the protocol (HTTP or HTTPS), and $request_uri is the full URI including parameters. 
server{
    listen         80;
    server_name    www.abc.com;
    
    # The first parameter of the return directive is the response code. The second parameter is optional and can be the redirection URL.
    # The return directive can be used in both location and server contexts.
    return 302 https://quicka.aliyun.com$request_uri;
}

Rewrite method 1

server {
    listen      80;
    server_name www.abc.com;
    
    # The first parameter, regex, is a regular expression.
    rewrite ^/(.*)$ http://quicka.aliyun.com/$1 redirect;
}

Rewrite method 2, forwarding with a path

server {
    listen      80;
    server_name www.abc.com;
    
    # The first parameter, regex, is a regular expression.
    rewrite ^/(.*)$ http://quicka.aliyun.com/$1 redirect;
}

FAQ for Alibaba Cloud SLB (ALB/NLB/CLB)

Alibaba Cloud SLB includes three product types. NLB and CLB do not support forwarding rule configuration. You must use ALB. For configuration instructions, see the following document:

Create a forwarding rule

Common configuration issues

① If the configured domain name is used only for domain forwarding, all requests must be forwarded to the Quick Audience domain.

② If the configured domain name has other uses, identify which requests originate from short link clicks. You can add an identifier when configuring the domain. Method 1: For example, https://abc.cn/p/. After receiving a request, check whether the URL contains /p/. If it does, forward it to the Quick Audience domain and replace /p/ with /short/. Method 2: Use a separate second-level domain, such as a.abc.cn, as the short link domain.

  • For example, https://abc.cn/p/e8as9x?ph=dbfhjs is converted to https://quicka.aliyun.com/short/e8as9x?ph=dbfhjs.

  • If there is a path identifier, use Rewrite method 2.

image

③ The Quick Audience domain that accepts forwarded requests is: https://quicka.aliyun.com/

④ After the domain name is configured, the actual path is:

User clicks the link --> Domain configured in Quick Audience (see: Configure a short domain name) --> Forwarded to the Quick Audience domain --> Parsed into a long link --> User sees the final destination page

⑤ Confirm that the domain name is active. ping q.melands.cn

An error result looks like this:

image

A correct result looks like this:

image

You can also use the dig command to verify DNS parsing.

3. Create a short link

Go to User Marketing > Short Link Management and click Create Short Link to open the creation page.

image

  • Select General Short Link. Using Alibaba Cloud Short Link is not recommended.

  • Enter a name for the short link and the original link address.

  • Select a validity period and type.

  • Click Confirm to create the short link.

image

4. Use a short link

Text messages, digital messages, and card messages in Lingyang SuperSMS support short links. Text messages in Short Message Service also support short links.

The following example shows how to use a short link in a text message with Lingyang SuperSMS.

4.1 Create an SMS template

① Go to User Marketing > Lingyang SuperSMS > SMS Templates > Text SMS and click New Text SMS Template.

image

2. On the Create Text SMS Template page,

Select a message type, enter the template name and content, click the Insert Short Link button, and select the short link that you created.

Important

To track click data, you must enable short parameters. Otherwise, the data cannot be collected.

image

③ After you create the SMS template, it appears under its message type in the template list.

image

4.2 Use an SMS template

On the sending task creation page, select the message type and SMS template. The preview pane shows the message content with the short link.

image