{"id":674,"date":"2018-01-05T02:15:23","date_gmt":"2018-01-05T08:15:23","guid":{"rendered":"https:\/\/www.linuxcloudvps.com\/blog\/?p=674"},"modified":"2018-01-31T08:56:21","modified_gmt":"2018-01-31T14:56:21","slug":"how-to-set-up-google-analytics-on-magento-2","status":"publish","type":"post","link":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/","title":{"rendered":"How to set up Google Analytics on Magento 2"},"content":{"rendered":"<p>In this guide we are going to provide you with step-by-step instructions on how to setup Google Analytics in Magento 2 on a <a href=\"https:\/\/www.linuxcloudvps.com\/centos-cloud-vps.html\">CentOS 7 VPS<\/a>. Google Analytics is a great <span class=\"st\">web analytics service that tracks and reports website traffic.<\/span> In order to enable Google Analytics in Magento 2, you need to install Magento 2 on your VPS, create a new Google Analytics Account or log in to your existing account if you have one, obtain a tracking ID and configure the Magento 2 website to use the newly created tracking ID.<br \/>\n<!--more--><\/p>\n<h3>1. Update OS packages<\/h3>\n<p>Before starting with the installation procedure, update the server OS packages with the latest available packages by running the following commands:<\/p>\n<pre>sudo yum clean all\r\nsudo yum update<\/pre>\n<h3>2. Install PHP 7<\/h3>\n<p>CentOS 7 has PHP 5.4 installed by default, but PHP 5.4 is not compatible with Magento 2. We can remove PHP 5.4 and install PHP 7.1 version. To do so, check which PHP 5.4 packages are installed on the server and remove them:<\/p>\n<pre>sudo rpm -qa | grep php\r\nphp-cli-5.4.16-42.el7.x86_64\r\nphp-pdo-5.4.16-42.el7.x86_64\r\nphp-common-5.4.16-42.el7.x86_64\r\nphp-5.4.16-42.el7.x86_64\r\nsudo yum remove php php-cli php-common php-pdo<\/pre>\n<p>Install PHP 7.1 using the iuscommunity repo:<\/p>\n<pre>sudo rpm -Uvh https:\/\/dl.iuscommunity.org\/pub\/ius\/stable\/CentOS\/7\/x86_64\/ius-release-1.0-15.ius.centos7.noarch.rpm\r\nsudo yum update\r\nsudo yum install php71u php71u-devel php71u-bcmath php71u-gd php71u-pdo php71u-mysqlnd php71u-xml php71u-mcrypt php71u-intl php71u-mbstring php71u-json php71u-iconv php71u-opcache php71u-imap php71u-soap<\/pre>\n<h3>3. Create a new database for Magento 2<\/h3>\n<pre>mysql -u root -p\r\nMariaDB [(none)]&gt; CREATE DATABASE magento2;\r\nMariaDB [(none)]&gt;GRANT ALL PRIVILEGES ON magento2.* TO &#039;magento2&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;Y0urPa55w0rd&#039;;\r\nMariaDB [(none)]&gt;flush privileges;\r\nMariaDB [(none)]&gt;quit;<\/pre>\n<h3>4. Create a new virtual host in Apache:<\/h3>\n<pre>vi \/etc\/httpd\/conf.d\/magento2.conf<\/pre>\n<p>Add the following lines and save the file:<\/p>\n<p>&lt;VirtualHost *:80&gt;<br \/>\nServerName yourdomain.com<br \/>\nServerAlias www.yourdomain.com<br \/>\nServerAdmin webmaster@yourdomain.com<br \/>\nDocumentRoot \/var\/www\/html\/magento2\/<\/p>\n<p>&lt;Directory \/var\/www\/html\/magento2&gt;<br \/>\nOptions Indexes FollowSymLinks MultiViews<br \/>\nAllowOverride All<br \/>\n&lt;\/Directory&gt;<\/p>\n<p>ErrorLog \/var\/www\/html\/magento2\/logs\/yourdomain.com_error.log<br \/>\nCustomLog \/var\/www\/html\/magento2\/logs\/yourdomain.com_access.log combined<\/p>\n<p>&lt;\/VirtualHost&gt;<\/p>\n<p>Set proper permissions to the files and directories of Magento 2:<\/p>\n<pre>sudo chown -R apache:apache \/var\/www\/html\/<\/pre>\n<p>Edit the PHP configuration file and add\/modify the following settings (change the timezone according to your actual timezone):<\/p>\n<pre>memory_limit = 512M\r\ndate.timezone = US\/Chicago<\/pre>\n<p>Restart the Apache service for the changes to take effect:<\/p>\n<pre>sudo systemctl restart httpd<\/pre>\n<h3>5. Install Magento 2<\/h3>\n<p>Download the latest version of Magento 2, and extract it on the server:<\/p>\n<pre>cd \/opt\/\r\nwget https:\/\/github.com\/magento\/magento2\/archive\/2.2.1.zip\r\nunzip 2.*.zip\r\nmv magento2* \/var\/www\/html\/magento2\/<\/pre>\n<p>Download and install composer using:<\/p>\n<pre>curl -sS https:\/\/getcomposer.org\/installer | php\r\nmv composer.phar \/usr\/local\/bin\/composer<\/pre>\n<p>Install Magento 2 using the following commands:<\/p>\n<pre>cd \/var\/www\/html\/magento2\/\r\nsudo composer install<\/pre>\n<p>The above command will install Magento 2 on your server by installing required frameworks.<\/p>\n<p>Open http:\/\/yourdomain.com in your favorite web browser and follow the easy instructions. For security reason, once the installation is complete, do not forget to remove write permissions from the &#8216;\/var\/www\/html\/magento2\/app\/etc&#8217; directory.<\/p>\n<p>Login to your Magento 2 back-end, go to to Stores &gt;&gt; Configuration &gt;&gt; Sales &gt;&gt; Google API, expand the Google Analytics option, select &#8216;Yes&#8217; to enable it, paste the tracking code in the &#8216;Account Number&#8217; field and click on the &#8216;Save Config&#8217; button for the changes to take effect.<\/p>\n<p>Log in to your Google Analytics account, and after a couple of minutes you should be able to track the activity on your website.<\/p>\n<p>Of course you don\u2019t have to set up Google Analytics on Magento 2 if you use one of our <a href=\"https:\/\/www.linuxcloudvps.com\/centos-cloud-vps.html\">Optimized CentOS 7 VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to <strong>add the Google Analytics code to Magento 2<\/strong> for you. They are available 24&#215;7 and will take care of your request immediately.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>PS.<\/strong><\/span> If you liked this post, on\u00a0How to set up Google Analytics on Magento 2, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide we are going to provide you with step-by-step instructions on how to setup Google Analytics in Magento 2 on a CentOS 7 VPS. Google Analytics is a great web analytics service that tracks and reports website traffic. In order to enable Google Analytics in Magento 2, you need to install Magento 2 &#8230; <a title=\"How to set up Google Analytics on Magento 2\" class=\"read-more\" href=\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/\" aria-label=\"More on How to set up Google Analytics on Magento 2\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":675,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[126,26,132,127],"class_list":["post-674","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-google-analytics","tag-install","tag-linuxcloudvps","tag-magento"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to set up Google Analytics on Magento 2 | LinuxCloudVPS Blog<\/title>\n<meta name=\"description\" content=\"In this guide we are going to provide you with step-by-step instructions on how to setup Google Analytics in Magento 2 on a CentOS 7 VPS. Google Analytics\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to set up Google Analytics on Magento 2 | LinuxCloudVPS Blog\" \/>\n<meta property=\"og:description\" content=\"In this guide we are going to provide you with step-by-step instructions on how to setup Google Analytics in Magento 2 on a CentOS 7 VPS. Google Analytics\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxCloudVPS Blog\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/LinuxCloudVPS\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-05T08:15:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-31T14:56:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-set-up-Google-Analytics-on-Magento-2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@LinuxCloudVPS\" \/>\n<meta name=\"twitter:site\" content=\"@LinuxCloudVPS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-set-up-google-analytics-on-magento-2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-set-up-google-analytics-on-magento-2\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#\\\/schema\\\/person\\\/ed907227ee7d151c617e6d0fe74f531a\"},\"headline\":\"How to set up Google Analytics on Magento 2\",\"datePublished\":\"2018-01-05T08:15:23+00:00\",\"dateModified\":\"2018-01-31T14:56:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-set-up-google-analytics-on-magento-2\\\/\"},\"wordCount\":528,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-set-up-google-analytics-on-magento-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/01\\\/How-to-set-up-Google-Analytics-on-Magento-2.jpg\",\"keywords\":[\"google analytics\",\"install\",\"linuxcloudvps\",\"magento\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-set-up-google-analytics-on-magento-2\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-set-up-google-analytics-on-magento-2\\\/\",\"url\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-set-up-google-analytics-on-magento-2\\\/\",\"name\":\"How to set up Google Analytics on Magento 2 | LinuxCloudVPS Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-set-up-google-analytics-on-magento-2\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-set-up-google-analytics-on-magento-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/01\\\/How-to-set-up-Google-Analytics-on-Magento-2.jpg\",\"datePublished\":\"2018-01-05T08:15:23+00:00\",\"dateModified\":\"2018-01-31T14:56:21+00:00\",\"description\":\"In this guide we are going to provide you with step-by-step instructions on how to setup Google Analytics in Magento 2 on a CentOS 7 VPS. Google Analytics\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-set-up-google-analytics-on-magento-2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-set-up-google-analytics-on-magento-2\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-set-up-google-analytics-on-magento-2\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/01\\\/How-to-set-up-Google-Analytics-on-Magento-2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/01\\\/How-to-set-up-Google-Analytics-on-Magento-2.jpg\",\"width\":600,\"height\":300,\"caption\":\"How to set up Google Analytics on Magento 2\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/how-to-set-up-google-analytics-on-magento-2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to set up Google Analytics on Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/\",\"name\":\"LinuxCloudVPS\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#organization\",\"name\":\"LinuxCloudVPS\",\"url\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/logo.png\",\"width\":217,\"height\":25,\"caption\":\"LinuxCloudVPS\"},\"image\":{\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"http:\\\/\\\/www.facebook.com\\\/LinuxCloudVPS\",\"https:\\\/\\\/x.com\\\/LinuxCloudVPS\",\"http:\\\/\\\/www.linkedin.com\\\/company\\\/linuxcloudvps-com\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/#\\\/schema\\\/person\\\/ed907227ee7d151c617e6d0fe74f531a\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"http:\\\/\\\/www.linuxcloudvps.com\\\/\"],\"url\":\"https:\\\/\\\/www.linuxcloudvps.com\\\/blog\\\/author\\\/r0s3admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to set up Google Analytics on Magento 2 | LinuxCloudVPS Blog","description":"In this guide we are going to provide you with step-by-step instructions on how to setup Google Analytics in Magento 2 on a CentOS 7 VPS. Google Analytics","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/","og_locale":"en_US","og_type":"article","og_title":"How to set up Google Analytics on Magento 2 | LinuxCloudVPS Blog","og_description":"In this guide we are going to provide you with step-by-step instructions on how to setup Google Analytics in Magento 2 on a CentOS 7 VPS. Google Analytics","og_url":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/","og_site_name":"LinuxCloudVPS Blog","article_publisher":"http:\/\/www.facebook.com\/LinuxCloudVPS","article_published_time":"2018-01-05T08:15:23+00:00","article_modified_time":"2018-01-31T14:56:21+00:00","og_image":[{"width":600,"height":300,"url":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-set-up-Google-Analytics-on-Magento-2.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@LinuxCloudVPS","twitter_site":"@LinuxCloudVPS","twitter_misc":{"Written by":"admin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/#article","isPartOf":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/"},"author":{"name":"admin","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/person\/ed907227ee7d151c617e6d0fe74f531a"},"headline":"How to set up Google Analytics on Magento 2","datePublished":"2018-01-05T08:15:23+00:00","dateModified":"2018-01-31T14:56:21+00:00","mainEntityOfPage":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/"},"wordCount":528,"commentCount":0,"publisher":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-set-up-Google-Analytics-on-Magento-2.jpg","keywords":["google analytics","install","linuxcloudvps","magento"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/","url":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/","name":"How to set up Google Analytics on Magento 2 | LinuxCloudVPS Blog","isPartOf":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/#primaryimage"},"image":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-set-up-Google-Analytics-on-Magento-2.jpg","datePublished":"2018-01-05T08:15:23+00:00","dateModified":"2018-01-31T14:56:21+00:00","description":"In this guide we are going to provide you with step-by-step instructions on how to setup Google Analytics in Magento 2 on a CentOS 7 VPS. Google Analytics","breadcrumb":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/#primaryimage","url":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-set-up-Google-Analytics-on-Magento-2.jpg","contentUrl":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2018\/01\/How-to-set-up-Google-Analytics-on-Magento-2.jpg","width":600,"height":300,"caption":"How to set up Google Analytics on Magento 2"},{"@type":"BreadcrumbList","@id":"https:\/\/www.linuxcloudvps.com\/blog\/how-to-set-up-google-analytics-on-magento-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.linuxcloudvps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to set up Google Analytics on Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#website","url":"https:\/\/www.linuxcloudvps.com\/blog\/","name":"LinuxCloudVPS","description":"","publisher":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.linuxcloudvps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#organization","name":"LinuxCloudVPS","url":"https:\/\/www.linuxcloudvps.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2023\/08\/logo.png","contentUrl":"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2023\/08\/logo.png","width":217,"height":25,"caption":"LinuxCloudVPS"},"image":{"@id":"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/www.facebook.com\/LinuxCloudVPS","https:\/\/x.com\/LinuxCloudVPS","http:\/\/www.linkedin.com\/company\/linuxcloudvps-com"]},{"@type":"Person","@id":"https:\/\/www.linuxcloudvps.com\/blog\/#\/schema\/person\/ed907227ee7d151c617e6d0fe74f531a","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"admin"},"sameAs":["http:\/\/www.linuxcloudvps.com\/"],"url":"https:\/\/www.linuxcloudvps.com\/blog\/author\/r0s3admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/posts\/674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/comments?post=674"}],"version-history":[{"count":3,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/posts\/674\/revisions"}],"predecessor-version":[{"id":678,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/posts\/674\/revisions\/678"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/media\/675"}],"wp:attachment":[{"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/media?parent=674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/categories?post=674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcloudvps.com\/blog\/wp-json\/wp\/v2\/tags?post=674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}