-
Notifications
You must be signed in to change notification settings - Fork 2
/
bidmotion.rb
80 lines (72 loc) · 2.21 KB
/
bidmotion.rb
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
69
70
71
72
73
74
75
76
77
78
79
80
class AdtekioAdnetworks::Postbacks::Bidmotion < AdtekioAdnetworks::BasePostbackClass
include AdtekioAdnetworks::BasePostbacks
define_network_config do
[:advnid]
end
define_postback_for :ios, :mac do
{ :url => "http://engine.mobdone.com/conversion",
:params => {
:advnid => "@{netcfg.advnid}@",
:tid => "@{params[:click]}@"
},
:store_user => true
}
end
define_postback_for :ios, :fun do
{ :url => "http://engine.mobdone.com/ltv",
:params => {
:advnid => "@{netcfg.advnid}@",
:tid => "@{user.click_data['click']}@",
:event_name => "tutorial",
:event_iosidfa => "@{event.adid}@"
},
:user_required => true,
:check => "event.params[:funnel_step] == 'level_won'"
}
end
define_postback_for :ios, :pay do
{ :url => "http://engine.mobdone.com/ltv",
:params => {
:advnid => "@{netcfg.advnid}@",
:tid => "@{user.click_data['click']}@",
:event_name => "purchase",
:event_revenue => "@{event.revenue}@",
:event_iosidfa => "@{event.adid}@"
},
:user_required => true
}
end
define_postback_for :android, :mac do
{ :url => "http://engine.mobdone.com/conversion",
:params => {
:advnid => "@{netcfg.advnid}@",
:tid => "@{params[:click]}@"
},
:store_user => true
}
end
define_postback_for :android, :fun do
{ :url => "http://engine.mobdone.com/ltv",
:params => {
:advnid => "@{netcfg.advnid}@",
:tid => "@{user.click_data['click']}@",
:event_name => "tutorial",
:event_androidid => "@{params[:gadid]}@"
},
:user_required => true,
:check => "event.params[:funnel_step] == 'level_won'"
}
end
define_postback_for :android, :pay do
{ :url => "http://engine.mobdone.com/ltv",
:params => {
:advnid => "@{netcfg.advnid}@",
:tid => "@{user.click_data['click']}@",
:event_name => "purchase",
:event_revenue => "@{event.revenue}@",
:event_androidid => "@{params[:gadid]}@"
},
:user_required => true
}
end
end