Add: seperate ads page from start page and apply Google Analytics code
This commit is contained in:
@@ -59,7 +59,7 @@ var Ads = {
|
||||
updateCounter: function() {
|
||||
this.counter--;
|
||||
if(this.counter == 0)
|
||||
game.state.start('Start');
|
||||
location.href = '../../web/client/start.html';
|
||||
else
|
||||
this.skipText.text = this.counter + "초 후에 게임 화면으로 넘어갑니다.";
|
||||
},
|
||||
@@ -0,0 +1,13 @@
|
||||
/////////////////////////////
|
||||
// Main game
|
||||
|
||||
var CONTENT_ID = "Ads";
|
||||
|
||||
var game = new Phaser.Game(
|
||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||
Phaser.CANVAS, CONTENT_ID
|
||||
);
|
||||
|
||||
|
||||
game.state.add('Ads', Ads);
|
||||
game.state.start('Ads');
|
||||
@@ -83,7 +83,10 @@ GameAppButton.prototype.clickEvent = function() {
|
||||
sessionStorageManager.setPlayingAppName(this.appInfo.AppName);
|
||||
sessionStorageManager.setPlayingAppKoreanName(this.appInfo.KoreanName);
|
||||
|
||||
location.href = '../../web/client/start.html';
|
||||
if(isExperiencePlayerAccount())
|
||||
location.href = '../../web/client/ads.html';
|
||||
else
|
||||
location.href = '../../web/client/start.html';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -105,7 +105,10 @@ TypingAppButton.prototype.clickEvent = function() {
|
||||
sessionStorageManager.setPlayingAppName(this.appInfo.AppName);
|
||||
sessionStorageManager.setPlayingAppKoreanName(this.appInfo.KoreanName);
|
||||
|
||||
location.href = '../../web/client/start.html';
|
||||
if(isExperiencePlayerAccount())
|
||||
location.href = '../../web/client/ads.html';
|
||||
else
|
||||
location.href = '../../web/client/start.html';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,9 +10,4 @@ var game = new Phaser.Game(
|
||||
|
||||
|
||||
game.state.add('Start', Start);
|
||||
game.state.add('Ads', Ads);
|
||||
|
||||
if(isExperiencePlayerAccount())
|
||||
game.state.start('Ads');
|
||||
else
|
||||
game.state.start('Start');
|
||||
game.state.start('Start');
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-85912788-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-85912788-2');
|
||||
</script>
|
||||
|
||||
<!-- Google Tag Manager -->
|
||||
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer','GTM-N8PB4F3');</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
|
||||
<title>광고</title>
|
||||
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
|
||||
|
||||
<!-- <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script> -->
|
||||
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/phaser/2.6.2/phaser.js"></script> -->
|
||||
<script src="../../../resources/js/phaser.min.js"></script>
|
||||
|
||||
<!-- global source files -->
|
||||
<script src="../../game/lib/session_storage_manager.js"></script>
|
||||
<script src="../../game/global/global_variables.js"></script>
|
||||
|
||||
<!-- library source files -->
|
||||
<script src="../../game/lib/keyboard_shortcut.js"></script>
|
||||
<script src="../../game/lib/number_util.js"></script>
|
||||
<script src="../../game/lib/string_util.js"></script>
|
||||
<script src="../../game/lib/date_util.js"></script>
|
||||
<script src="../../game/lib/history_record_manager.js"></script>
|
||||
<script src="../../game/lib/db_connect_manager.js"></script>
|
||||
<script src="../../game/lib/input_type_text.js"></script>
|
||||
<script src="../../game/lib/button/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/button/back_button.js"></script>
|
||||
<script src="../../game/lib/button/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/screen_top_ui.js"></script>
|
||||
<script src="../../game/lib/screen_bottom_ui.js"></script>
|
||||
<script src="../../game/lib/how_to_play.js"></script>
|
||||
<script src="../../game/lib/chart.js"></script>
|
||||
<script src="../../game/lib/announce_box.js"></script>
|
||||
|
||||
<!-- source files -->
|
||||
<script src="../../game/ads/ads.js"></script>
|
||||
<script src="../../game/ads/main.js"></script>
|
||||
|
||||
|
||||
<style>
|
||||
body{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
canvas{
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Google Admob
|
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({
|
||||
google_ad_client: "ca-pub-1331753663238060",
|
||||
enable_page_level_ads: true
|
||||
});
|
||||
</script>
|
||||
-->
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="Ads" style="text-align:center;"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -34,7 +34,6 @@
|
||||
<script src="../../game/lib/announce_box.js"></script>
|
||||
|
||||
<!-- source files -->
|
||||
<script src="../../game/start/ads.js"></script>
|
||||
<script src="../../game/start/start.js"></script>
|
||||
<script src="../../game/start/main.js"></script>
|
||||
|
||||
@@ -50,6 +49,7 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Google Admob
|
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({
|
||||
@@ -57,6 +57,7 @@
|
||||
enable_page_level_ads: true
|
||||
});
|
||||
</script>
|
||||
-->
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user