If the HTML files are outside of your wordpress installation, you need to insert the Google Analytics tracking code into each of the HTML pages manually.
For the WordPress pages, you can insert the code into your Theme’s header file (usually header.php) or similar or use one of the many plugins to do this.
Related Posts:
- Approve post directly from preview mode?
- How are WordPress draft previews generated?
- and previews
- Preview Button Custom
- Which ID does WordPress actually use to display published/drafted posts in preview mode?
- Allow Previewer Role to Preview Posts
- How to allow potential clients to preview a theme
- Theme Live Preview on Front End?
- Preview post when using custom post page
- Google Analytics appending index.cfm to end of my URLs
- Google Analytics – Language (not set) & Sharebutton.to
- Uncaught ReferenceError: ga is not defined
- Disable plugin / plugin action via theme
- Passing current cookies in wp_remote_get to get Draft Post Preview
- ‘Preview Changes’ for custom meta boxes?
- View homepage in a preview mode
- Post/Page Preview Template
- How can I enable Google Analytics on a file download link?
- How can I change preview URL?
- Disable device preview options in the block editor
- How to preview your website without the top WordPress admin bar, but remain signed in?
- Can’t preview drafts after upgrade to 4.0!
- Unable to get Preview of Uploaded image within a Custom Meta box
- Does wordpress insert automatic google analytic?
- Can I integrate Google Analytics with my blog, hosted at wordpress.com?
- Multiple meta values for same meta_key adding on “Preview Changes” hit but not on saving or updating post
- View category in the preview of Theme Customizer
- How to make scheduled post preview visible to anyone?
- Enable commenting on front-end preview page for pending posts
- Page with page template not using template in Preview
- What type of Google tracking should I use?
- Suspicious google tag manager
- Tracking Disqus comments on Google Analytics
- Post preview and oembed provider issue using polylang plugin with subdomains
- Tracking Published Date as Custom Variable for Google Analytics
- What program can I use to preview my wordpress site?
- Are there any plugins yet that support Facebook Like, Google +1 and allow Social Interaction tracking on Google Analytics
- wp_add_inline_script not adding when script_loader_tag filtered
- WordPress version 3.8 – Preview button not working for editor
- customize_preview_init: listening for any changes from Customizer preview area
- How Can I Add OnClick Event To A Specific WordPress Menu Link
- Custom post type “preview” not working
- Custom post preview without saving
- Show preview posts and pages to clients
- How do you manage the Gutenberg block previews in the admin area?
- Change target of view link in admin
- Track tags in Google Analytics? [closed]
- Tracking post type in Google Analytics
- Multiple Google Analytics codes for individual pages
- Add unique id to Preview URL
- How to install Google Analytics onto site without internet access
- Is there a WordPress form plugin that can easily be configured for Google Analytics goals?
- Moving to a WordPress blog. What do I need to know?
- Live reload preview just reloads forever
- How to find and remove the tracking codes running in my wordpress site?
- What does /?s=free&cat=plus-5-results mean in Google Analytics?
- How to track analytics with a WordPress site under the same domain as my main site?
- WordPress gtag.js with User ID tracking
- Add Google Tracker Tag to Login Page
- WP + Google analytics = /search?
- Google Analytics always shows at least two page views per visit – What can cause this?
- Trim Post Content on Home Page
- Hide content from Post Preview
- 404 when Previewing an unsaved draft
- Google Analytics event tracking code being stripped out of links in Author box – WordPress site
- Show preview of wordpress posts on external html sever
- how does ‘init’ /’parse_request’ hook work for wordpress?
- Woocommerce + Google Analytics (Conversion Rate Not Working)
- How to set Google Analytics tracking code on WordPress plugin directory page?
- Multiple Google Analytics for Multiple pagepath
- Google Tag Manager only load when connected to Admin
- Google Analytics gtag code messes up woocommerce cart & login
- How do I export categories, site stats, comments and posts from wordpress to excel
- When add analytics script, wordpress user login not working
- Different Google Analytics code based on Users Device
- Custom post type single page uses the right template in preview mode but shows a different template after being posted
- Having a different landing page for returning users
- Post thumbnail not working when previewing post
- How can I replicate this functionality on my site?
- Tracking sales/conversions in Woocommerce using Google Analytics
- Having SSL enabled on admin, but disabled on post preview and live preview?
- Customizer Image-Picker Preview Not Working
- New accounts daily at WP Multi-User site under development, Analytics reports no traffic. What gives?
- Error 404 when saving or previewing one specific page [closed]
- Google analytic issue in wordpress
- Post preview in iframe without saving the post
- Disabling “View” mentions from backend?
- how to chang preview of list of articles of one category?
- Redirect preview single post link to a page
- allow previews outside wordpress folder (Outsourcing WP previews)
- Preview own posts if logged in
- How to include the admin bar?
- Download statistics for WordPress site?
- Hiding Google Analytics code based on theme options
- Save Draft and Preview not working (1 post)
- Google Analytics tracking article based on post date
- How do I add google tracking code to a wordpress.com site?
- Plugins menu not on dashboard
- Looking for a way to insert PDF image preview in TinyMCE
- WordPress + Polylang – Error 404 when trying to preview draft post on different language