Tutorials
Track URL activity in RCS messages
Track URL activity in RCS messages

Track URL activity in RCS messages

Rich communication services (RCS) messages often contain links to help end users go to the correct location or perform the required action. You can track these URLs to see how end users interact with your messages and identify their preferences and behavior.

You can then use this information to do the following:

  • Personalization: Personalize future messages, making them more relevant.
  • Performance analytics: Analyze the effectiveness of your campaigns.

This tutorial shows how to track URL clicks in RCS and generate reports. Customize the example to meet your use case and requirements.

Products and channels

Prerequisites

  • Infobip account: If you do not have one, create a free trial account and select RCS as the channel on the welcome screen.
  • Infobip API key with rcs:message:send scope: For information about creating an API key with the required scope, refer to API authorization.
  • HTTP client: This tutorial uses curl. Alternatively, you can choose the official Infobip SDK for the required programming language.
  • RCS agent or sender: If you want to configure a custom RCS sender, please contact your Infobip account manager.
  • Destination: A phone number to which RCS messages are sent. If the RCS agent is not launched, you can only send to safelisted phone numbers.

Implementation over the Infobip web interface

Create and launch a new broadcast

  1. On the Infobip web interface (opens in a new tab), go to Moments > Broadcasts.

  2. Select Create new broadcast.

  3. Select RCS as the channel.

  4. Choose the Recipients and select a Sender.

  5. In the Content section, create a Text message that includes a URL.

    Example: For news about CPaaS in Infobip, go to https://www.infobip.com/news/infobip-is-one-of-the-top-cpaas-providers-in-metrigys-cpaas-metrirank-report.

    Create the message
  6. Select Tracking and reporting and do the following:

    • Select Shorten URLs.
    • (Optional) Remove https:// from the domain.
    • Choose a domain - Default or Custom.
    • Select Track URL clicks so that performance reports are available in Analyze.
    Configure tracking and reporting
  7. Select Continue to preview.

  8. Verify the content in the preview page.

  9. Select Launch.

Get performance reports in Analyze

After you launch the campaign, you can get the Performance DLR from the Analyze section.

  1. On the Infobip web interface, go to Analyze > Reports.

  2. Select Create reports.

  3. Select Performance.

  4. In the Performance report content section, select Detailed clicks by URL and recipients.

    Select reporting parameters
  5. Select the other metrics that you want for the report. Example: Date range and status.

  6. Select View additional filters.

  7. In the Communications field, select the name of the broadcast that you created.

  8. Select Create report.

  9. When the report is created, download it to see the results.

    Download the report Downloaded report

Implementation over API

  1. Create an API request (opens in a new tab) to send RCS messages. In the API request, enable webhooks and tracking.

    curl
    curl -X POST https://api.infobip.com/rcs/2/messages \
    -H 'Authorization: App {YOUR_API_KEY}' \
    -H 'Content-Type: application/json' \
    -d '{
    "messages": [
        {
        "sender": "{YOUR_SENDER}",
        "destinations": [
            {
            "to": "{YOUR_DESTINATION}"
            }
        ],
        "content": {
            "text": "Shorten URL and tracking test https://www.infobip.com/news/infobip-is-one-of-the-top-cpaas-providers-in-metrigys-cpaas-metrirank-report",
            "suggestions": [],
            "type": "TEXT"
        },
        "webhooks": {
            "delivery": {
            "url": "YOUR_URL",
            "notify": true
            },
            "callbackData": "URLtracking test",
            "seen": {
            "url": "YOUR_URL"
            }
        }
        }
    ],
    "options": {
        "tracking": {
        "shortenUrl": true,
        "trackClicks": true,
        "trackingUrl": "YOUR_URL"
        }
    }
    }
  2. After a successful request (200 OK), you should receive the RCS message on the destination.

  3. Select the link in the RCS message. Delivery reporting (DLR) is now included in the webhook URL.

    Delivery report in the API

Additional resources

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products