Inject JS into index.html

Discussion and feedback on Construct 2

Post » Fri Apr 26, 2013 9:53 am

Hello,

is there any possibility to inject a js code (google analytics script) directly into index.html automatically on export? So far as I understand calling GA externally is not good.
B
42
S
11
G
4
Posts: 505
Reputation: 7,267

Post » Fri Apr 26, 2013 10:02 am

@xoros

You might embedded index.html by iframe into your page which has google analytics script.rexrainbow2013-04-26 10:03:49
B
97
S
22
G
178
Posts: 4,120
Reputation: 104,047

Post » Fri Apr 26, 2013 10:11 am

True, that's an option.

Another question: Has anybody tried to track different game events with GA? Something like button/mouse clicks etc.xoros2013-04-26 10:14:02
B
42
S
11
G
4
Posts: 505
Reputation: 7,267

Post » Fri Sep 20, 2013 1:00 am

@xoros I was thinking to use Google Docs for analytics and realtime configuration (to adjust ad placements in realtime without the need to recompile and republish)
Do you have any idea how to use AJAX to post/request a query to Google Docs? (a spreadsheet for example)
B
64
S
16
G
20
Posts: 471
Reputation: 16,131

Post » Fri Sep 20, 2013 10:18 am

@Cipriux
Never done that before, but as far as I understand, the first thing you have to do is to check Google Docs API, if required js-calls are possible. I think it will not be a problem to make a js-call from construct, there's also a Browser object function Execute Javascript.
B
42
S
11
G
4
Posts: 505
Reputation: 7,267

Post » Fri Sep 20, 2013 10:27 am

@xoros Thank you . I will look in to that Google Docs API when I will learn more about JS
B
64
S
16
G
20
Posts: 471
Reputation: 16,131


Return to Construct 2 General

Who is online

Users browsing this forum: Gianmichele, WhosWho and 6 guests