How to Fire a Webhook on Click of your Short Link
y.gy empowers you to effortlessly integrate a webhook with your short link, ensuring you receive instant notifications for every click on your condensed link in real time.
Tailor the integration of y.gy's Webhooks to suit your specific needs. The abundance of parameters provides a wealth of data to enhance your analytics and user profiling. You could leverage the instantaneous nature of Webhooks to gain real-time insights into user behavior, geographical distribution, and device preferences.
Steps to Activate
- Upon selecting the desired link from the
All Links
tab, proceed to theConfigure
tab. - Add your Webhook URL in the
Webhook
Field. You would probably have to scroll to find the field. Finally, click on the "Update Short Link" button to save the changes. - When a user clicks on your link, we will send a
POST
request to your endpoint.
Please note that any webhook POST request will timeout if it cannot establish a connection with your server in 30 seconds, or if it does not receive a response from the server in 90 seconds.
Click Event
The Webhook is triggered each time a click is initiated on your tiny URL. The payload delivered by the webhook includes comprehensive information such as geographical details, user agent specifics, and UTM parameters, providing valuable insights into user engagement with the shortened URL.
Properties
- Name
event
- Type
- string
- Description
When the link is clicked, the event will always be
click.
- Name
payload
- Type
- object
- Description
Payload containing all the data related to the click event.
Payload Object
- Name
domain
- Type
- string
- Description
The domain of the shortened link.
- Name
suffix
- Type
- string
- Description
The suffix of the shortened link.
- Name
ip_address
- Type
- string
- Description
The IP address of the user that accessed the link. Defaults to
Unknown
if unavailable.
- Name
user_agent
- Type
- string
- Description
The user's agent string. Defaults to an empty string.
- Name
timestamp
- Type
- string
- Description
A serialized UTC timestamp is used for when the link was clicked.
- Name
key
- Type
- string
- Description
The unique key associated with the event. If it doesn't exist, it defaults to
_root
.
- Name
browser
- Type
- string
- Description
The user's browser that was used to access the link. Defaults to
Unknown
.
- Name
browser_version
- Type
- string
- Description
The version of the user's browser that was used to access the link. Defaults to
Unknown
.
- Name
engine
- Type
- string
- Description
The user's agent string. Defaults to an empty string.
- Name
os
- Type
- string
- Description
The user's operating system. Defaults to
Unknown
.
- Name
os_version
- Type
- string
- Description
The user's operating system version. Defaults to
Unknown
.
- Name
device
- Type
- string
- Description
The type of device used to access the link. Defaults to
Unknown
.
- Name
device_vendor
- Type
- string
- Description
The brand of the user's device. Defaults to
Unknown
.
- Name
device_model
- Type
- string
- Description
The model of the user's device. Defaults to
Unknown
.
- Name
bot
- Type
- string
- Description
A boolean type-casted as string, indicating whether the user is a bot.
- Name
referer
- Type
- string
- Description
The referring website's netloc. The default value is
Direct
.
- Name
referer_url
- Type
- string
- Description
The full URL of the referring website. The default value is
Direct
.
- Name
continent_name
- Type
- string
- Description
The name of the continent of the user. Defaults to
Unknown
.
- Name
country_code
- Type
- string
- Description
This code represents the user's country. Defaults to
Unknown
.
- Name
country_name
- Type
- string
- Description
The name of the country. Defaults to
Unknown
.
- Name
state_prov
- Type
- string
- Description
The state or province name. Defaults to
Unknown
.
- Name
state_prov_code
- Type
- string
- Description
This code represents the user's state or province. Defaults to
Unknown
.
- Name
city
- Type
- string
- Description
The city of the user. Defaults to
Unknown
.
- Name
zip_code
- Type
- string
- Description
The ZIP or postal code. Defaults to
Unknown
.
- Name
latitude
- Type
- float
- Description
The latitude of the user's geographical location. Defaults to
-1
if unavailable.
- Name
longitude
- Type
- string
- Description
The longitude of the user's geographical location. Defaults to
-1
if unavailable.
- Name
time_zone
- Type
- string
- Description
The time zone of the user. Defaults to
Unknown
.
- Name
utm_source
- Type
- string
- Description
Identifies the source of your destination link traffic, if it exists.
- Name
utm_medium
- Type
- string
- Description
Specifies the marketing medium used, e.g., email or social, if any.
- Name
utm_campaign
- Type
- string
- Description
Associates the click with a specific marketing campaign.
- Name
utm_term
- Type
- string
- Description
Captures specific terms related to the destination link.
- Name
utm_content
- Type
- string
- Description
Differentiates between similar content in a campaign.
- Name
utm_referrer
- Type
- string
- Description
Refers to the referring website, if available.
- Name
utm_referrer_url
- Type
- string
- Description
Captures the URL of the referring website.
Webhook Response
{
"event": "click",
"paylaod": {
"domain": "y.gy",
"suffix": "example",
"ip_address": "192.101.67.90",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"timestamp": "2024-01-11T18:15:42.862088",
"key": "_root",
"browser": "Chrome",
"browser_version": "120.0.0",
"engine": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"os": "iOS",
"os_version": "Unknown",
"device": "iPhone"
"device_model": "Other",
"device_vendor": "Apple",
"bot": "False",
"referer": "Direct",
"referer_url": "Direct",
"continent_name": "Europe",
"country_code": "AT",
"country_name": "Austria",
"state_prov": "Lower Austria",
"state_prov_code": "3",
"city": "Gföhl",
"zip_code": "Unknown",
"latitude": -1,
"longitude": -1,
"time_zone": "Europe/Vienna",
"state_prov_code": "3",
"utm_source": "google",
"utm_medium": null,
"utm_campaign": null,
"utm_term": null,
"utm_content": null,
"utm_referrer": null,
"utm_referrer_url": null,
}