Em4e commited on
Commit
ddb96e5
Β·
verified Β·
1 Parent(s): b0f2c48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -22
app.py CHANGED
@@ -116,37 +116,44 @@ class SeoAppUI:
116
  def _display_info_expander(self):
117
  with st.expander("ℹ️ How the app works [CLICK TO EXPAND]", expanded=False):
118
  st.markdown(
119
- """
120
  <div style="background-color: #f0f2f6; padding: 20px; border-radius: 10px;">
121
- <p>1. <b>Load your GSC data</b> (we lowercase all column names on load). If no file is uploaded, we use the default sample data. If no <code>cpc</code> column is present, we simulate values between 0.50 and 3.00 USD.</p>
122
- <p>2. <b>CTR benchmarks</b> by position map an expected click-through rate for positions 1–20.</p>
123
- <p>3. <b>Incremental Clicks</b> = Projected_Clicks – Current_Clicks</p>
124
- <p>&nbsp;&nbsp;&nbsp;&nbsp;β€’ Current_Clicks = Impressions Γ— Current_CTR</p>
125
- <p>&nbsp;&nbsp;&nbsp;&nbsp;β€’ Projected_Clicks = Impressions Γ— Target_CTR</p>
126
- <p>4. <b>Financials</b></p>
127
- <p>&nbsp;&nbsp;&nbsp;&nbsp;β€’ <b>Avoided Paid Spend</b> = Incremental_Clicks Γ— CPC. This represents the money you <b>don't</b> have to spend on paid ads because your organic SEO efforts are now bringing in those clicks and conversions.</p>
128
- <p>&nbsp;&nbsp;&nbsp;&nbsp;β€’ <b>Net Savings vs Paid</b> = Avoided Paid Spend – SEO Investment</p>
129
- <p>&nbsp;&nbsp;&nbsp;&nbsp;β€’ <b>Incremental MRR</b> = Customers Γ— MRR_per_Customer</p>
130
- <p>&nbsp;&nbsp;&nbsp;&nbsp;β€’ <b>SEO ROI</b> = (Incremental MRR – SEO Investment) Γ· SEO Investment</p>
131
- <p><b>Understanding "Additional Ad Spend"</b></p>
132
- <p>The "Additional Ad Spend" input in the sidebar is a <b>hypothetical budget figure you provide for comparison</b>. It's <b>not</b> calculated from your GSC data or CPC. Instead, it allows you to:</p>
 
 
 
 
 
 
 
133
  <ul>
134
- <li><b>Compare SEO's revenue generation directly against a specific paid ad budget.</b> For instance, if you're considering spending an extra X dollars on Google Ads, you can see whether your SEO's projected incremental MRR is higher or lower than that same amount.</li>
135
- <li><b>Visualize the efficiency of your SEO investment.</b> If your SEO investment generates significantly more incremental MRR than a comparable additional ad spend, it highlights SEO as a potentially more effective use of marketing funds.</li>
136
  </ul>
137
- <p>The "Ad Spend" metric will be <span style="color: green; font-weight: bold;">green</span> if your projected Incremental MRR from SEO is <b>greater than</b> this additional ad spend, and <span style="color: red; font-weight: bold;">red</span> if it is not.</p>
138
-
139
- <p>5. <b>Interpreting Results & Assumptions</b></p>
140
  <ul>
141
- <li><b>Target SERP Position:</b> The 'Target SERP Position' is an <u>aspirational average</u> you aim for among your <u>most important and achievable keywords</u>, rather than a literal expectation for every single query. In reality, not all keywords will reach the same position due to varying competition and relevance.</li>
142
- <li><b>High-Impact Queries:</b> While the model calculates for all queries, focus your analysis on the 'Detailed Keyword Performance' table. Look for queries with a 'πŸš€ Improvement' impact category and high 'impressions' and 'incremental_clicks'. These are often your most promising opportunities for SEO effort.</li>
143
  </ul>
144
  </div>
145
  """,
146
- unsafe_allow_html=True,
147
- )
148
  )
149
 
 
150
  def _get_sidebar_inputs(self):
151
  with st.sidebar:
152
  st.header("πŸ”§ Assumptions & Inputs")
 
116
  def _display_info_expander(self):
117
  with st.expander("ℹ️ How the app works [CLICK TO EXPAND]", expanded=False):
118
  st.markdown(
119
+ """
120
  <div style="background-color: #f0f2f6; padding: 20px; border-radius: 10px;">
121
+ <p><b>1. Load Your GSC Data</b><br>
122
+ If no file is uploaded, a sample is used. All column names are lowercased. If no <code>cpc</code> column is found, CPC values are simulated between 0.50–3.00 USD.</p>
123
+
124
+ <p><b>2. CTR Benchmarks by Position</b><br>
125
+ Expected click-through rates (CTR) are mapped for positions 1–20 to estimate traffic uplift.</p>
126
+
127
+ <p><b>3. Incremental Clicks</b><br>
128
+ <code>Incremental Clicks = Projected - Current</code><br>
129
+ &nbsp;&nbsp;β€’ Current = Impressions Γ— Current CTR<br>
130
+ &nbsp;&nbsp;β€’ Projected = Impressions Γ— Target CTR</p>
131
+
132
+ <p><b>4. Financial Impact</b><br>
133
+ &nbsp;&nbsp;β€’ <b>Avoided Paid Spend</b> = Incremental Clicks Γ— CPC (value of organic traffic replacing paid ads)<br>
134
+ &nbsp;&nbsp;β€’ <b>Net Savings</b> = Avoided Spend – SEO Investment<br>
135
+ &nbsp;&nbsp;β€’ <b>Incremental MRR</b> = Customers Γ— MRR per Customer<br>
136
+ &nbsp;&nbsp;β€’ <b>SEO ROI</b> = (Incremental MRR – SEO Investment) Γ· SEO Investment</p>
137
+
138
+ <p><b>5. Understanding β€œAd Spend”</b><br>
139
+ This is a <b>user-defined hypothetical amount</b> used only for comparison. It is not derived from CPC or added to SEO cost. The app compares:</p>
140
  <ul>
141
+ <li><b>SEO's incremental MRR</b> from your defined SEO investment</li>
142
+ <li><b>Against a fixed ad spend</b> (e.g. what you might spend on paid campaigns)</li>
143
  </ul>
144
+ <p>The β€œAd Spend” box turns <span style="color: green; font-weight: bold;">green</span> when SEO outperforms ads, or <span style="color: red; font-weight: bold;">red</span> otherwise.</p>
145
+
146
+ <p><b>6. Interpreting Results</b></p>
147
  <ul>
148
+ <li><b>Target SERP Position</b>: Acts as a uniform benchmark applied to all queries to project improvement.</li>
149
+ <li><b>Focus on High-Impact Keywords</b>: In the results table, look for β€œπŸš€ Improvement” rows with high impressions and incremental clicks β€” these are your SEO sweet spots.</li>
150
  </ul>
151
  </div>
152
  """,
153
+ unsafe_allow_html=True,
 
154
  )
155
 
156
+
157
  def _get_sidebar_inputs(self):
158
  with st.sidebar:
159
  st.header("πŸ”§ Assumptions & Inputs")