Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-09-09 12:41:56 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-09-09 12:41:56 +0400
commit774611a1b63c9d2e4dca67810ee8c20f442b7611 (patch)
tree93a4134504fee1add1fa28ec647544cf4d4ca3f2 /misc/internal-docs/content-tracking.md
parenta3e0c5d2502becc3ca2977d32ac6d9d1911c1ca5 (diff)
refs #4996 many new tests and bugfixes, worked around some JSLint regexp issues and disabled the whitespace check which makes no sense to me. The tests do now run again in PhantomJS but report a lot of failures and I have not looked yet into it.
Diffstat (limited to 'misc/internal-docs/content-tracking.md')
-rw-r--r--misc/internal-docs/content-tracking.md18
1 files changed, 13 insertions, 5 deletions
diff --git a/misc/internal-docs/content-tracking.md b/misc/internal-docs/content-tracking.md
index bcaa6ddb0e..19c950af5a 100644
--- a/misc/internal-docs/content-tracking.md
+++ b/misc/internal-docs/content-tracking.md
@@ -300,7 +300,7 @@ A typical example for a content block that displays a text ad.
## Tracking the content programmatically
-There are several ways to track a content impression and/or interaction manually, semi-automatically and automatically.
+There are several ways to track a content impression and/or interaction manually, semi-automatically and automatically. Please be aware that content impressions will be tracked using bulk tracking which will always send a `POST` request, even if `GET` is configured which is the default.
#### `trackContentImpressions()`
@@ -330,13 +330,21 @@ Please note: In case you have enabled to only track visible content blocks we wi
If you enable to track only visible content we will only track an impression if a content block is actually visible. With visible we mean the content block has been in the view port, it is actually in the DOM and is not hidden via CSS (opacity, visibility, display, ...).
* Optionally you can tell us to rescan the DOM automatically after each scroll event by passing `checkOnSroll=true`. We will then check whether the previously hidden content blocks are visible now and if so track the impression.
+ * Parameter defaults to boolean `true` if not specified.
+ * As the scroll event is triggered after each pixel scrolling would be very slow when checking for new visible content blocks each time the event is triggered. Instead we are checking every 100ms whether a scroll event was triggered and if so we scan the DOM for new visible content blocks
+ * Note: If a content block is placed within a scrollable element (`overflow: scroll`), we do currently not attach an event in case the user scrolls within this element. This means we would not detect that such an element becomes visible.
* Optionally you can tell us to rescan the entire DOM for new impressions every X milliseconds by passing `timeIntervalInMs=500` (rescan DOM every 500ms).
- * Note: Rescanning the entire DOM and detecting the visible state of content blocks can take a while depending on the browser and amount of content
- * Note: We do not really rescan every X milliseconds. We will schedule the next rescan after a previous scan has finished. So if it takes 20ms to scan the DOM and you tell us to rescan every 50ms it can actually take 70ms.
- * Note: In case your frames per second goes down you might want to increase this value
+ * If parameter is not set, a default interval sof 750ms will be used.
+ * Rescanning the entire DOM and detecting the visible state of content blocks can take a while depending on the browser and amount of content
+ * We do not really rescan every X milliseconds. We will schedule the next rescan after a previous scan has finished. So if it takes 20ms to scan the DOM and you tell us to rescan every 50ms it can actually take 70ms.
+ * In case your frames per second goes down you might want to increase this value
* If you do not want us to perform any checks you can either call `trackContentImpressions()` manually at any time to rescan the entire DOM or `trackContentImpressionsWithinNode()` to check only a specific part of the DOM for visible content blocks.
-It is recommended to call this method once before any call to `trackContentImpressions` or `trackContentImpressionsWithinNode()`
+It is recommended to call this method once before any call to `trackContentImpressions` or `trackContentImpressionsWithinNode()`. If you call this method more than once it does not have any effect.
+
+#### `trackVisibleContentImpressions(checkOnSroll, timeIntervalInMs)`
+
+Is a shorthand for calling `enableTrackOnlyVisibleContent()` and `trackContentImpressions()`.
#### trackContentInteractionNode(domNode, contentInteraction)