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

findContentNodesTest.html « content-fixtures « javascript « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 94a1fdc99eab20c93597a9cfa3fbcc3502e894d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<div>
    <img id="ex1" src="img-en.jpg" data-track-content/>
    <img id="ex2" src="img-en.jpg" class="piwikTrackContent"/>
    <!-- used for testing detection of content elements via attribute -->
    <div id="ex3" data-track-content>
        <img src="http://www.example.com/path/xyz.jpg" data-content-piece />
        <a href="/anylink" data-content-target>Add to shopping cart</a>
    </div>
    <!-- used for testing detection of content elements via class -->
    <div id="ex4" data-track-content>
        <img src="http://www.example.com/path/xyz.jpg" class="piwikContentPiece" />
        <a href="/anylink" class="piwikContentTarget">Add to shopping cart</a>
    </div>
    <!-- used for testing detection of attribute takes precendency over CSS-->
    <div id="ex5" data-track-content>
        <span src="http://www.example.com/path/xyz.jpg" class="piwikContentPiece">Piece with class</span>
        <span src="http://www.example.com/path/xyz.jpg" data-content-piece>Piece with attribute</span>
        <a href="/anylink" class="piwikContentTarget">Target with class</a>
        <a href="/anylink" data-content-target>Target with attribute</a>
    </div>
    <!-- used for testing always the first matching one will be picked if many have same class -->
    <div id="ex6" data-track-content>
        <span src="http://www.example.com/path/xyz.jpg" class="piwikContentPiece">Piece with class1</span>
        <span src="http://www.example.com/path/xyz.jpg" class="piwikContentPiece">Piece with class2</span>
        <a href="/anylink" class="piwikContentTarget">Target with class1</a>
        <a href="/anylink" class="piwikContentTarget">Target with class2</a>
    </div>
    <!-- used for testing always the first matching one will be picked if many have same attribute -->
    <div id="ex7" data-track-content>
        <span src="http://www.example.com/path/xyz.jpg" data-content-piece>Piece with attribute1</span>
        <span src="http://www.example.com/path/xyz.jpg" data-content-piece>Piece with attribute2</span>
        <a href="/anylink" data-content-target>Target with attribute1</a>
        <a href="/anylink" data-content-target>Target with attribute2</a>
    </div>
</div>