> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/convert/url-shorteners/url-shorteners-how-to-use-the-shortened-link-in-the-pages-whatsapp-button.md). Agents can also search and read this documentation through its [MCP server](https://docs.sprinthub.com/~gitbook/mcp).

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

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FiKVc95xEfkqY3AUB65Iu%2Fundraw_Inspiration_re_ivlv.png?alt=media&amp;token=d6f9eafc-2794-4f4c-8383-5f16a9923126" 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 interaction with your leads, allowing for quick and direct communication. Using shortened links can make this process easier, 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 that 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 simply.
2. **Immediate Interaction**: Makes real-time interaction easier, 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` using the shortened URL generated in SprintHub.

#### Required Settings

**Required Message**

It is crucial that the message included in the link be 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=Hello%2C+I+am+interested+in+learning+more+about+your+services.
```

#### Testing the Button

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

1. Go to your page and click the WhatsApp button.
2. Check that the redirection is correct and that the predefined message is sent automatically.

#### Conclusion

Using shortened links for the WhatsApp button on your page can make it easier to interact with leads and improve the efficiency of your service. By following the steps described, you will ensure that tracking is accurate 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 offer quality service through WhatsApp.
