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
44
S
11
G
4
Posts: 508
Reputation: 7,350

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
105
S
25
G
216
Posts: 4,295
Reputation: 123,644

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
44
S
11
G
4
Posts: 508
Reputation: 7,350

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
73
S
19
G
21
Posts: 492
Reputation: 17,226

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
44
S
11
G
4
Posts: 508
Reputation: 7,350

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
73
S
19
G
21
Posts: 492
Reputation: 17,226


Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests