<commit_before><section class="gh-canvas" {{did-insert this.loadData}}>

    <GhCanvasHeader class="gh-canvas-header stacked gh-post-analytics-header">
        <div class="gh-canvas-breadcrumb">
            <LinkTo @route="posts">
                Posts
            </LinkTo>
            {{svg-jar "arrow-right-small"}}Analytics
        </div>
        <h2 class="gh-canvas-title gh-post-title">
            {{this.post.title}}
        </h2>
        <p class="gh-post-analytics-meta">
            {{#if
                (or this.post.isSent
                    (and this.post.isPublished this.post.email)
                    this.post.willEmail
                )
            }}
                {{#if this.post.emailOnly}}
                    Sent
                {{else}}
                    Published and sent
                {{/if}}
            {{else}}
                Published on your site
            {{/if}}

            {{#let (moment-site-tz this.post.publishedAtUTC) as |publishedAt|}}
                on
                {{moment-format publishedAt "D MMM YYYY"}}
                at
                {{moment-format publishedAt "HH:mm"}}
            {{/let}}
        </p>
    </GhCanvasHeader>

    <h4 class="gh-main-section-header small bn">
        Engagement
    </h4>
    <div class="gh-post-analytics-box">
        {{#if (or this.post.isSent (and this.post.isPublished this.post.email))}}
            <div class="gh-post-analytics-item">
                <h3>{{format-number this.post.email.emailCount}}</h3>
                <p>Sent</p>
            </div>

            {{#if (and this.post.email.trackOpens this.settings.emailTrackOpens) }}
                <div class="gh-post-analytics-item">
                    <h3>{{this.post.email.openRate}}<sup>%</sup></h3>
                    <p><strong>{{format-number this.post.email.openedCount}}</strong> opened</p>
                </div>
            {{/if}}

            {{#if this.settings.emailTrackClicks}}
                <div class="gh-post-analytics-item">
                    <h3>{{this.post.clickRate}}<sup>%</sup></h3>
                    <p><strong>{{format-number this.post.count.clicks}}</strong> clicked</p>
                </div>
            {{/if}}
        {{/if}}


        {{#if (and (feature 'memberAttribution') (not this.post.emailOnly)) }}
            <div class="gh-post-analytics-item">
                <h3>{{format-number this.post.count.signups}}</h3>
                <p>{{gh-pluralize this.post.count.signups "Signup" without-count=true}}</p>
            </div>

            {{#if this.membersUtils.paidMembersEnabled}}
                <div class="gh-post-analytics-item">
                    <h3>{{format-number this.post.count.conversions}}</h3>
                    <p><span class="hide-when-small">Paid </span>{{gh-pluralize this.post.count.conversions "conversion" without-count=true}}</p>
                </div>
            {{/if}}
        {{/if}}
    </div>

    {{#if (and this.settings.emailTrackClicks (or this.post.isSent (and this.post.isPublished this.post.email)))}}
        <h4 class="gh-main-section-header small bn">
            Link clicks
        </h4>
        {{#if (not-eq this.links null)}}
            {{#if (is-empty this.links) }}
                No links in email.
            {{else}}
                <div class="gh-post-analytics-box column">
                    <div class="gh-links-list">
                        {{#each this.links as |link|}}
                            <div class="gh-links-list-item">
                                <a href="{{link.link.to}}">{{link.link.title}}</a>
                                <p class="gh-links-list-clicks">{{link.count.clicks}}</p>
                            </div>
                        {{/each}}
                    </div>
                </div>
            {{/if}}
        {{else}}
            Loading...
        {{/if}}
    {{/if}}

    {{#if (and (feature 'sourceAttribution') (not this.post.emailOnly))}}
        <h4 class="gh-main-section-header small bn">
            Source attribution
        </h4>
        {{#if (not-eq this.sources null) }}
            {{#if (is-empty this.sources) }}
                No data yet.
            {{else}}
                <div class="gh-post-analytics-box resources">
                    <div style="display: grid;
                        grid-template-columns: 2fr 1fr;
                        grid-gap: 64px;
                    ">
                        <MemberAttribution::SourceAttributionTable @sources={{this.sources}} />

                        <div style="border-left: 1px solid #eceef0; padding-left: 48px;display: flex;justify-content: center;align-items: center;">
                            <div style="max-width: 200px;">
                                <MemberAttribution::SourceAttributionChart @sources={{this.sources}} />
                            </div>
                        </div>
                    </div>
                </div>
            {{/if}}
        {{else}}
            Loading...
        {{/if}}
    {{/if}}

    <h4 class="gh-main-section-header small bn">
        Get started with analytics
    </h4>
    <div class="gh-post-analytics-box resources">
        <div class="gh-post-analytics-resource">
            <div class="thumbnail" style="background-image: url(assets/img/marketing/analytics-1.jpg);"></div>
            <div class="flex flex-column justify-between">
                <div>
                    <h3>📈 Understand analytics in Ghost</h3>
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
                </div>
                <div class="gh-btn gh-btn-link">Become an expert &rarr;</div>
            </div>
        </div>
        <div class="gh-post-analytics-resource">
            <div class="thumbnail" style="background-image: url(assets/img/marketing/analytics-2.jpg);"></div>
            <div class="flex flex-column justify-between">
                <div>
                    <h3>How to best share your shiz</h3>
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
                </div>
                <div class="gh-btn gh-btn-link">Sharing is caring &rarr;</div>
            </div>
        </div>
    </div>
    
</section>
<commit_msg>Moved the empty links into it's own box in the post analytics page<commit_after><section class="gh-canvas" {{did-insert this.loadData}}>

    <GhCanvasHeader class="gh-canvas-header stacked gh-post-analytics-header">
        <div class="gh-canvas-breadcrumb">
            <LinkTo @route="posts">
                Posts
            </LinkTo>
            {{svg-jar "arrow-right-small"}}Analytics
        </div>
        <h2 class="gh-canvas-title gh-post-title">
            {{this.post.title}}
        </h2>
        <p class="gh-post-analytics-meta">
            {{#if
                (or this.post.isSent
                    (and this.post.isPublished this.post.email)
                    this.post.willEmail
                )
            }}
                {{#if this.post.emailOnly}}
                    Sent
                {{else}}
                    Published and sent
                {{/if}}
            {{else}}
                Published on your site
            {{/if}}

            {{#let (moment-site-tz this.post.publishedAtUTC) as |publishedAt|}}
                on
                {{moment-format publishedAt "D MMM YYYY"}}
                at
                {{moment-format publishedAt "HH:mm"}}
            {{/let}}
        </p>
    </GhCanvasHeader>

    <h4 class="gh-main-section-header small bn">
        Engagement
    </h4>
    <div class="gh-post-analytics-box">
        {{#if (or this.post.isSent (and this.post.isPublished this.post.email))}}
            <div class="gh-post-analytics-item">
                <h3>{{format-number this.post.email.emailCount}}</h3>
                <p>Sent</p>
            </div>

            {{#if (and this.post.email.trackOpens this.settings.emailTrackOpens) }}
                <div class="gh-post-analytics-item">
                    <h3>{{this.post.email.openRate}}<sup>%</sup></h3>
                    <p><strong>{{format-number this.post.email.openedCount}}</strong> opened</p>
                </div>
            {{/if}}

            {{#if this.settings.emailTrackClicks}}
                <div class="gh-post-analytics-item">
                    <h3>{{this.post.clickRate}}<sup>%</sup></h3>
                    <p><strong>{{format-number this.post.count.clicks}}</strong> clicked</p>
                </div>
            {{/if}}
        {{/if}}


        {{#if (and (feature 'memberAttribution') (not this.post.emailOnly)) }}
            <div class="gh-post-analytics-item">
                <h3>{{format-number this.post.count.signups}}</h3>
                <p>{{gh-pluralize this.post.count.signups "Signup" without-count=true}}</p>
            </div>

            {{#if this.membersUtils.paidMembersEnabled}}
                <div class="gh-post-analytics-item">
                    <h3>{{format-number this.post.count.conversions}}</h3>
                    <p><span class="hide-when-small">Paid </span>{{gh-pluralize this.post.count.conversions "conversion" without-count=true}}</p>
                </div>
            {{/if}}
        {{/if}}
    </div>

    {{#if (and this.settings.emailTrackClicks (or this.post.isSent (and this.post.isPublished this.post.email)))}}
        <h4 class="gh-main-section-header small bn">
            Link clicks
        </h4>
        {{#if (not-eq this.links null)}}
            <div class="gh-post-analytics-box column">
                <div class="gh-links-list">
                    {{#if (is-empty this.links) }}
                        There are no links in this email.
                    {{else}}
                        {{#each this.links as |link|}}
                            <div class="gh-links-list-item">
                                <a href="{{link.link.to}}">{{link.link.title}}</a>
                                <p class="gh-links-list-clicks">{{link.count.clicks}}</p>
                            </div>
                        {{/each}}
                    {{/if}}
                </div>
            </div>
        {{else}}
            Loading...
        {{/if}}
    {{/if}}

    {{#if (and (feature 'sourceAttribution') (not this.post.emailOnly))}}
        <h4 class="gh-main-section-header small bn">
            Source attribution
        </h4>
        {{#if (not-eq this.sources null) }}
            {{#if (is-empty this.sources) }}
                No data yet.
            {{else}}
                <div class="gh-post-analytics-box resources">
                    <div style="display: grid;
                        grid-template-columns: 2fr 1fr;
                        grid-gap: 64px;
                    ">
                        <MemberAttribution::SourceAttributionTable @sources={{this.sources}} />

                        <div style="border-left: 1px solid #eceef0; padding-left: 48px;display: flex;justify-content: center;align-items: center;">
                            <div style="max-width: 200px;">
                                <MemberAttribution::SourceAttributionChart @sources={{this.sources}} />
                            </div>
                        </div>
                    </div>
                </div>
            {{/if}}
        {{else}}
            Loading...
        {{/if}}
    {{/if}}

    <h4 class="gh-main-section-header small bn">
        Get started with analytics
    </h4>
    <div class="gh-post-analytics-box resources">
        <div class="gh-post-analytics-resource">
            <div class="thumbnail" style="background-image: url(assets/img/marketing/analytics-1.jpg);"></div>
            <div class="flex flex-column justify-between">
                <div>
                    <h3>📈 Understand analytics in Ghost</h3>
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
                </div>
                <div class="gh-btn gh-btn-link">Become an expert &rarr;</div>
            </div>
        </div>
        <div class="gh-post-analytics-resource">
            <div class="thumbnail" style="background-image: url(assets/img/marketing/analytics-2.jpg);"></div>
            <div class="flex flex-column justify-between">
                <div>
                    <h3>How to best share your shiz</h3>
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
                </div>
                <div class="gh-btn gh-btn-link">Sharing is caring &rarr;</div>
            </div>
        </div>
    </div>
    
</section>

{'fraction_non_alphanumeric': 0.14940300821832841, 'fraction_numerical': 0.005737323616064506, 'mean_word_length': 1.4255359157578036, 'pattern_counts': {'":': 0, '<': 227, '<?xml version=': 0, '>': 227, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '665666', 'n_tokens_mistral': 3896, 'n_tokens_neox': 3631, 'n_words': 719}