Naver log analysis script, YoungCart 5

7 months ago 284

If you start Naver search ads and apply for Premium Log Analysis, you will receive an email with script installation instructions.
If you create a shopping mall using 'YoungCart 5' and want to install the script yourself, click the 'Check Analysis Script' button in the instruction email and follow the instructions on the resulting page.

For more details, refer to the Naver Premium Log Analysis Installation Guide Email.

Common Script Installation

The common script must be inserted on every page of your website where you want to analyze logs. This script calls the essential script 'wcslog.js', sets the 'Naver Common Key (na_account_id)' to recognize your site, and contains code related to information collection and transmission.

<script type="text/javascript" src="//wcs.naver.net/wcslog.js"></script> 
<script type="text/javascript"> 
if (!wcs_add) var wcs_add={};
wcs_add["wa"] = "s_1s2a3m4p5l6e7";
if (!_nasa) var _nasa={};
if(window.wcs){
  wcs.inflow();
  wcs_do(_nasa);
}
</script>

The red part of the example script is the Naver common key, which is different for each site and can also be viewed in the Naver ad system.

'YoungCart 5' has a feature to input the 'Visitor Analysis Script' in the admin page. Go to 'Settings' and then 'Basic Settings' and enter it as shown below, then click the 'Confirm' button to save.

sir.kr-1

If you prefer to input directly via hardcoding instead of using the admin page, enter it above </body> in the '/tail.sub.php' page. If you are using a theme, insert it into '/theme/theme_name/tail.sub.php'.

Conversion Script Installation

'Conversion' refers to a visitor reaching a specific page on your site, and the conversion page is determined by the advertiser.
There are five types of conversions defined by Naver: Purchase Completion (1), Member Registration (2), Add to Cart (3), Application/Reservation (4), and Other (5). The conversion script should be inserted into the appropriate page matching these types, with suitable 'Conversion Type Value' and 'Conversion Value' inputs.

<script type="text/javascript" src="//wcs.naver.net/wcslog.js"></script> 
<script type="text/javascript"> 
var _nasa={};
if(window.wcs) _nasa["cnv"] = wcs.cnv("1","20000");
</script>

The conversion script should appear above the common script, so place it higher in the code.
In the example script, the red parts '1' and '20000' indicate that the script is on the purchase completion page and the conversion value is 20,000 won.

YoungCart 5, Purchase Conversion

In YoungCart 5, the pages to check for purchase conversions are 'orderformupdate.php' and 'orderinquiryview.php' in the '/shop' directory. However, 'orderinquiryview.php' is also used for order inquiries, so modify the conversion script as shown below and insert it.

<script type="text/javascript" src="//wcs.naver.net/wcslog.js"></script>
<script type="text/javascript">
if (document.referrer.indexOf("shop/orderform.php") >= 0) {
  var _nasa={};
  _nasa["cnv"] = wcs.cnv("1", "<?php echo $tot_price ?>");
}
</script>

The insertion position should be above the PHP code calling '/_tail.php' at the bottom. For the mobile version, the files are in '/mobile/shop', and if using a theme, they are in '/theme/theme_name/shop'. Apply as appropriate for your situation.

YoungCart 5, Member Registration

The page where member registration is completed is '/bbs/register_result.php', which uses a skin file.
Therefore, the conversion script should be placed at the very bottom of '/skin/member/skin_name/register_result.skin.php'. If there is a separate mobile version, insert it into '/mobile/skin/member/skin_name/register_result.skin.php' as well.
If using a theme, the paths are '/theme/theme_name/skin/member/skin_name/register_result.skin.php' and '/theme/theme_name/mobile/skin/member/skin_name/register_result.skin.php', respectively.

Unlike purchase conversion where the amount is fixed, the conversion value for member registration can be set arbitrarily.


Collection of Korean Spelling and Grammar Chec…

We have gathered a collection of Hangul-related sites, including spe..

Explore Korean Culture and Entertainment: Your…

Discover the richness of Korean culture and entertainment through ou..

Recommended essential and popular carousel sli…

A carousel slider is a commonly used element in web design that pres..

Sustainable Future Environmental Organization …

This section introduces various organizations' websites that work to..

Absolute path, relative path and HTML example.

An absolute path specifies the full path from the root directory of ..

PHP GD library, JPEG PNG lossy compression rat…

When converting images in JPG (JPEG) and PNG formats using the PHP G..