Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2023-10-21 16:32:19

raminrahimi
Member
From: India
Registered: 2013-03-19
Posts: 276

How to count links clicked ?

I’m developing a website for my client, he is uploading files outside his website and linking the files (external URL) in the article’s body.
For example, he uploads a PDF file to Google Drive copies the link and pastes it to his website like HTML Learning Book <a href="something_url_to_download_file">Download</a>
Now he wants to know how many times the Download button was clicked and also if possible to know the country name of who clicked but this feature is optional, if it is impossible to do it in TXP leave that.
Can anyone plz find a solution for this ?
—-
Note: I tried with the custom field but couldn’t succeed !
I’m thinking of pasting that URL in a custom field of the article and dynamically the button comes when custom_field is available, then redirects to that external URL and count …

Offline

#2 2023-10-24 07:32:20

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 305
Website GitHub Twitter

Re: How to count links clicked ?

Hello, you can measure this with an analytics tool and JavaScript. Here is the explanation for Google Analytics and for Matomo.

Offline

Board footer

Powered by FluxBB