V
V
ValikStar2019-02-14 15:56:05
Google Analytics
ValikStar, 2019-02-14 15:56:05

Personal Google analytics per Wordpress (Elementor) page?

On a Wordpress account, 10 pages (multiple domain) were created using Elementor, all pages (ie sites) have their own domains and do not intersect.
You need the ability to add a different Google Analytics script to each site.
Because The header of the theme is assigned to all pages, and the statistics are seen as general, a separate one is needed.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2019-02-14
@azerphoenix

what is the problem of creating different header for different pages? True, templates for them also need to be made.
Another option is to add scripts to the current header.php using conditional tags.
For example,

<?php if(is_page(ID-1)): ?>
<!-- google analytics 1 -->
<?php else if(is_page(ID-2)): ?>
<!-- google analytics 2 -->
<?php else: ?>
<!-- google analytics 3 -->
<?php endif; ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question