-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathpardot-1.0.js
68 lines (58 loc) · 1.31 KB
/
pardot-1.0.js
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* eslint-disable func-names */
import {
hit,
noopFunc,
noopStr,
noopNull,
} from '../helpers';
/**
* @redirect pardot-1.0
*
* @description
* Mocks the pd.js file of Salesforce.
* https://pi.pardot.com/pd.js
* https://developer.salesforce.com/docs/marketing/pardot/overview
*
* ### Examples
*
* ```adblock
* ||pi.pardot.com/pd.js$script,redirect=pardot
* ||pacedg.com.au/pd.js$redirect=pardot
* ```
*
* @added v1.6.55.
*/
export function Pardot(source) {
window.piVersion = '1.0.2';
window.piScriptNum = 0;
window.piScriptObj = [];
window.checkNamespace = noopFunc;
window.getPardotUrl = noopStr;
window.piGetParameter = noopNull;
window.piSetCookie = noopFunc;
window.piGetCookie = noopStr;
function piTracker() {
window.pi = {
tracker: {
visitor_id: '',
visitor_id_sign: '',
pi_opt_in: '',
campaign_id: '',
},
};
window.piScriptNum += 1;
}
window.piResponse = noopFunc;
window.piTracker = piTracker;
piTracker();
hit(source);
}
export const PardotNames = ['pardot-1.0'];
// eslint-disable-next-line prefer-destructuring
Pardot.primaryName = PardotNames[0];
Pardot.injections = [
hit,
noopFunc,
noopStr,
noopNull,
];