Skip to content

Plugin to implement impressions and clicks of advanced Analytics commerce in WordPress posts

Notifications You must be signed in to change notification settings

TechShareRoom/ga-ec-posts-wordpress

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ga-ec-posts-wordpress

Plugin to implement impressions and clicks of advanced Analytics commerce in WordPress posts

Forked from here

Discord Banner 2

For now, it's necessary to insert the following onclick event in the links of the file where the posts loop is called:

onclick="productObject('<?php the_title(); ?>','<?php the_ID(); ?>','<?php echo get_the_author_meta('ID'); ?>','<?php  $cat = get_the_category(); echo $cat[0]->cat_name; ?>','<?php $posttags = get_the_tags();
					if ($posttags) {i
					  foreach($posttags as $tag) {
						echo $tag->name . ', '; 
					  }
					} ?>','<?php wp_title(); ?>','<?php the_permalink(); ?>')"

The file changes depending on the theme, in the flymag WordPress theme for example, it is the content.php

REQUIREMENTS

  • You need to have Google Analytics installed in WordPress for the plugin to work
  • You need to have the Advanced Trade part of Google Analytics activated
    • To activate this, access the Manage of Google Analytics, in the Views column in Electronic Commerce Configuration activate the two options and save.
  • Insert the code of the onclick above given in the links to the articles

TO DO

Pendant

DONE

Pendant

Contributors

About

Plugin to implement impressions and clicks of advanced Analytics commerce in WordPress posts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%