Answer the question
In order to leave comments, you need to log in
How do you catch referrals from different domains?
There is a server with nginx
It runs under 10 sites,
one client has 2 domains leading to the same site, conditionally sitename.ru (the main one in promotion, etc.) and 1234567.ru (it advertises services on board the car)
But maybe in the nginx settings - these 2 aliases work out very quickly and I can’t figure out how to track visits from 1234567.ru?
Somehow I don’t want to raise the setting of the next domain and stupidly register 1 page there with a redirect to sitename.ru, but there are no other thoughts.
Maybe a respected community will throw an idea and I shouldn't reinvent the wheel with crutches?
Thank you!
Answer the question
In order to leave comments, you need to log in
My solution to the issue:
In the server section of the nginx config, we write 1 line with a redirect and we get what we need in the statistics. Unfortunately, other methods didn’t work for me, I’m sharing the result, maybe it will come in handy for someone.
It should be borne in mind that this construction will be displayed in the statistics of visits to the Matomo counter - in Yandex Metrica it will be visible as an internal transition.
But since we actively use Matomo, we coped with the task :)
server {
server_name 123456.ru www.123456.ru; Это домен на борту автомобиля
return 301 https://SITE-NAME-KUDA-PEREYTI.ru/index.php?pk_campaign=gazel; это сайт куда надо перебросить посетителя
root /var/www/123456.ru/web;
......
make sure it is enabled access_log
in NGINX and analyze the logs.
For example, you can filter by status code 301
- it will definitely be in the line.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question