mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 08:17:58 -05:00
Give GA 500ms to send out gold flow tracking pixels.
This commit is contained in:
committed by
Neil Williams
parent
e5a0e1b364
commit
d930799df3
@@ -141,8 +141,13 @@ r.analytics = {
|
||||
// If GA is loaded, have GA process form submission after firing
|
||||
// (and cancel the default).
|
||||
_gaq.push(['_trackPageview', '/gold/external/' + vendor])
|
||||
_gaq.push(function(){ form.submit() })
|
||||
|
||||
_gaq.push(function() {
|
||||
// Give GA half a second to send out its pixel.
|
||||
setTimeout(function() {
|
||||
form.submit()
|
||||
}, 500)
|
||||
})
|
||||
|
||||
if (_gat && _gat._getTracker){
|
||||
// GA is loaded; form will submit via the _gaq.push'ed function
|
||||
event.preventDefault()
|
||||
|
||||
Reference in New Issue
Block a user