# URL Shorteners - How to use the shortened link in the page's WhatsApp button

<figure><img src="/files/b619a68f1ce07a8786415b7bc91d761b3f071843" alt=""><figcaption></figcaption></figure>

### How to Use the Shortened Link in the Page's WhatsApp Button

Adding a WhatsApp button to your page can significantly increase engagement with your leads, enabling quick and direct communication. Using shortened links can simplify this process, especially when you need to track the source of clicks. In this article, we will cover how to use SprintHub's URL shortener to add a WhatsApp link to your page's button, ensuring it works correctly.

#### Importance of the WhatsApp Link

The WhatsApp button on a page offers several advantages:

1. **Ease of Contact**: Allows leads to contact your company quickly and easily.
2. **Immediate Interaction**: Facilitates real-time interaction, increasing efficiency in customer service.
3. **Campaign Tracking**: With shortened links, you can track the source of clicks and evaluate the effectiveness of your campaigns.

#### Step-by-Step to Use the Shortened Link

**1. Create the WhatsApp Link**

To create a link that redirects the user to WhatsApp, you need to use the following format:

```javascript
https://api.whatsapp.com/send?l=pt&phone=[PHONE_NUMBER]&text=[MESSAGE]
```

* **PHONE\_NUMBER**: Enter the phone number in international format, without spaces, parentheses, or hyphens.
* **MESSAGE**: Add the predefined message that the lead should send. This message must be exactly the same for the link to work correctly.

**3. Add the Link to the WhatsApp Button**

Now, you need to add the shortened link to the WhatsApp button in your page's script; follow the article below explaining how to create the WhatsApp button on your page:

{% embed url="<https://docs.sprinthub.com/estrategias/marketing/whatsapp/criando-um-botao-do-whatsapp-personalizado>" %}

Replace `SHORTENED_LINK` by the shortened URL generated in SprintHub.

#### Required Settings

**Mandatory Message**

It is crucial that the message included in the link is sent exactly as it is. If the lead changes the message or does not send any message, the link will not work correctly. Therefore, the message must be clear and specific.

#### Practical Examples

**1. Creating the Link**

Original link:

```java
https://api.whatsapp.com/send?l=pt&phone=5511999999999&text=Olá%2C+tenho+interesse+em+saber+mais+sobre+seus+serviços.
```

#### Testing the Button

After configuring the button with the shortened link, test it to ensure it works correctly:

1. Access your page and click the WhatsApp button.
2. Check if the redirection is correct and if the predefined message is sent automatically.

#### Conclusion

Using shortened links for the WhatsApp button on your page can facilitate interaction with leads and improve the efficiency of your support. By following the described steps, you will ensure accurate tracking and that the button works correctly, providing an optimized and effective user experience.

By implementing these practices in SprintHub, you will be better equipped to engage your leads and provide quality support via WhatsApp.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sprinthub.com/en/topics/convert/url-shorteners/url-shorteners-how-to-use-the-shortened-link-in-the-pages-whatsapp-button.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
